@@ -123,13 +123,13 @@ func (f *Filter) Count() int64 {
123123}
124124
125125// And returns a new Bloom filter that consists of all elements
126- // that belong to both f1 and f2. It requires two filters with
127- // the same size and the same false-positives rate.
126+ // that belong to both f1 and f2. The two filters must be of
127+ // the same size and have the same false-positives rate.
128128//
129- // The false-positive rate of the resulting filter is at most
130- // the false-positive rate of f1 and f2, but may be larger than
131- // the rate of the filter created from scratch using the intersection
132- // of the two sets.
129+ // The false-positive rate of the resulting filter is bounded by
130+ // the maximum false-positive rate of f1 and f2, but it may be larger
131+ // than the rate of the filter created from scratch using
132+ // the intersection of the two sets.
133133func (f1 * Filter ) And (f2 * Filter ) * Filter {
134134 if len (f1 .data ) != len (f2 .data ) || f1 .lookups != f2 .lookups {
135135 panic ("operation requires filters of the same type" )
@@ -154,8 +154,8 @@ func (f1 *Filter) And(f2 *Filter) *Filter {
154154}
155155
156156// Or returns a new Bloom filter that consists of all elements
157- // that belong to either f1 or f2. It requires two filters with
158- // the same size and the same false-positives rate.
157+ // that belong to either f1 or f2. The two filters must be of
158+ // the same size and have the same false-positives rate.
159159//
160160// The resulting filter is the same as the filter created from scratch
161161// using the union of the two sets.
0 commit comments