1- using System . Collections ;
1+ using BloomFilter . Configurations ;
22
33namespace BloomFilter ;
44
@@ -7,6 +7,16 @@ namespace BloomFilter;
77/// </summary>
88public partial class FilterBuilder
99{
10+ /// <summary>
11+ /// Creates a BloomFilter for the specified expected element
12+ /// </summary>
13+ /// <param name="options"><see cref="FilterMemoryOptions"/></param>
14+ /// <returns></returns>
15+ public static IBloomFilter Build ( FilterMemoryOptions options )
16+ {
17+ return new FilterMemory ( options ) ;
18+ }
19+
1020 /// <summary>
1121 /// Creates a BloomFilter for the specified expected element
1222 /// </summary>
@@ -42,60 +52,6 @@ public static IBloomFilter Build(long expectedElements, HashFunction hashFunctio
4252 return Build ( expectedElements , 0.01 , hashFunction , name ) ;
4353 }
4454
45- /// <summary>
46- /// Creates a BloomFilter for the specified expected element
47- /// </summary>
48- /// <param name="bits">Sets the bit value</param>
49- /// <param name="expectedElements">The expected elements.</param>
50- /// <param name="errorRate">The error rate.</param>
51- /// <param name="name"></param>
52- /// <returns></returns>
53- public static IBloomFilter Build ( byte [ ] bits , long expectedElements , double errorRate , string name = BloomFilterConstValue . DefaultInMemoryName )
54- {
55- return Build ( bits , expectedElements , errorRate , HashFunction . Functions [ HashMethod . Murmur3 ] , name ) ;
56- }
57-
58- /// <summary>
59- /// Creates a BloomFilter for the specified expected element
60- /// </summary>
61- /// <param name="bits">Sets the bit value</param>
62- /// <param name="more">Sets more the bit value</param>
63- /// <param name="expectedElements">The expected elements.</param>
64- /// <param name="errorRate">The error rate.</param>
65- /// <param name="name"></param>
66- /// <returns></returns>
67- public static IBloomFilter Build ( byte [ ] bits , byte [ ] more , long expectedElements , double errorRate , string name = BloomFilterConstValue . DefaultInMemoryName )
68- {
69- return Build ( bits , more , expectedElements , errorRate , HashFunction . Functions [ HashMethod . Murmur3 ] , name ) ;
70- }
71-
72- /// <summary>
73- /// Creates a BloomFilter for the specified expected element
74- /// </summary>
75- /// <param name="bits">Sets the bit value</param>
76- /// <param name="expectedElements">The expected elements.</param>
77- /// <param name="errorRate">The error rate.</param>
78- /// <param name="name"></param>
79- /// <returns></returns>
80- public static IBloomFilter Build ( BitArray bits , long expectedElements , double errorRate , string name = BloomFilterConstValue . DefaultInMemoryName )
81- {
82- return Build ( bits , expectedElements , errorRate , HashFunction . Functions [ HashMethod . Murmur3 ] , name ) ;
83- }
84-
85- /// <summary>
86- /// Creates a BloomFilter for the specified expected element
87- /// </summary>
88- /// <param name="bits">Sets the bit value</param>
89- /// <param name="more">Sets more the bit value</param>
90- /// <param name="expectedElements">The expected elements.</param>
91- /// <param name="errorRate">The error rate.</param>
92- /// <param name="name"></param>
93- /// <returns></returns>
94- public static IBloomFilter Build ( BitArray bits , BitArray more , long expectedElements , double errorRate , string name = BloomFilterConstValue . DefaultInMemoryName )
95- {
96- return Build ( bits , more , expectedElements , errorRate , HashFunction . Functions [ HashMethod . Murmur3 ] , name ) ;
97- }
98-
9955 /// <summary>
10056 /// Creates a BloomFilter for the specified expected element
10157 /// </summary>
@@ -108,64 +64,6 @@ public static IBloomFilter Build(long expectedElements, double errorRate, string
10864 return Build ( expectedElements , errorRate , HashFunction . Functions [ HashMethod . Murmur3 ] , name ) ;
10965 }
11066
111- /// <summary>
112- /// Creates a BloomFilter for the specified expected element
113- /// </summary>
114- /// <param name="bits">Sets the bit value</param>
115- /// <param name="expectedElements">The expected elements.</param>
116- /// <param name="errorRate">The error rate.</param>
117- /// <param name="hashMethod">The hash method.</param>
118- /// <param name="name"></param>
119- /// <returns></returns>
120- public static IBloomFilter Build ( byte [ ] bits , long expectedElements , double errorRate , HashMethod hashMethod , string name = BloomFilterConstValue . DefaultInMemoryName )
121- {
122- return new FilterMemory ( bits , name , expectedElements , errorRate , HashFunction . Functions [ hashMethod ] ) ;
123- }
124-
125- /// <summary>
126- /// Creates a BloomFilter for the specified expected element
127- /// </summary>
128- /// <param name="bits">Sets the bit value</param>
129- /// <param name="more">Sets more the bit value</param>
130- /// <param name="expectedElements">The expected elements.</param>
131- /// <param name="errorRate">The error rate.</param>
132- /// <param name="hashMethod">The hash method.</param>
133- /// <param name="name"></param>
134- /// <returns></returns>
135- public static IBloomFilter Build ( byte [ ] bits , byte [ ] ? more , long expectedElements , double errorRate , HashMethod hashMethod , string name = BloomFilterConstValue . DefaultInMemoryName )
136- {
137- return new FilterMemory ( bits , more , name , expectedElements , errorRate , HashFunction . Functions [ hashMethod ] ) ;
138- }
139-
140- /// <summary>
141- /// Creates a BloomFilter for the specified expected element
142- /// </summary>
143- /// <param name="bits">Sets the bit value</param>
144- /// <param name="expectedElements">The expected elements.</param>
145- /// <param name="errorRate">The error rate.</param>
146- /// <param name="hashMethod">The hash method.</param>
147- /// <param name="name"></param>
148- /// <returns></returns>
149- public static IBloomFilter Build ( BitArray bits , long expectedElements , double errorRate , HashMethod hashMethod , string name = BloomFilterConstValue . DefaultInMemoryName )
150- {
151- return new FilterMemory ( bits , name , expectedElements , errorRate , HashFunction . Functions [ hashMethod ] ) ;
152- }
153-
154- /// <summary>
155- /// Creates a BloomFilter for the specified expected element
156- /// </summary>
157- /// <param name="bits">Sets the bit value</param>
158- /// <param name="more">Sets more the bit value</param>
159- /// <param name="expectedElements">The expected elements.</param>
160- /// <param name="errorRate">The error rate.</param>
161- /// <param name="hashMethod">The hash method.</param>
162- /// <param name="name"></param>
163- /// <returns></returns>
164- public static IBloomFilter Build ( BitArray bits , BitArray ? more , long expectedElements , double errorRate , HashMethod hashMethod , string name = BloomFilterConstValue . DefaultInMemoryName )
165- {
166- return new FilterMemory ( bits , more , name , expectedElements , errorRate , HashFunction . Functions [ hashMethod ] ) ;
167- }
168-
16967 /// <summary>
17068 /// Creates a BloomFilter for the specified expected element
17169 /// </summary>
@@ -179,65 +77,6 @@ public static IBloomFilter Build(long expectedElements, double errorRate, HashMe
17977 return new FilterMemory ( name , expectedElements , errorRate , HashFunction . Functions [ hashMethod ] ) ;
18078 }
18179
182-
183- /// <summary>
184- /// Creates a BloomFilter for the specified expected element
185- /// </summary>
186- /// <param name="bits">Sets the bit value</param>
187- /// <param name="expectedElements">The expected elements.</param>
188- /// <param name="errorRate">The error rate.</param>
189- /// <param name="hashFunction">The hash function.</param>
190- /// <param name="name"></param>
191- /// <returns></returns>
192- public static IBloomFilter Build ( byte [ ] bits , long expectedElements , double errorRate , HashFunction hashFunction , string name = BloomFilterConstValue . DefaultInMemoryName )
193- {
194- return new FilterMemory ( bits , name , expectedElements , errorRate , hashFunction ) ;
195- }
196-
197- /// <summary>
198- /// Creates a BloomFilter for the specified expected element
199- /// </summary>
200- /// <param name="bits">Sets the bit value</param>
201- /// <param name="more">Sets more the bit value</param>
202- /// <param name="expectedElements">The expected elements.</param>
203- /// <param name="errorRate">The error rate.</param>
204- /// <param name="hashFunction">The hash function.</param>
205- /// <param name="name"></param>
206- /// <returns></returns>
207- public static IBloomFilter Build ( byte [ ] bits , byte [ ] more , long expectedElements , double errorRate , HashFunction hashFunction , string name = BloomFilterConstValue . DefaultInMemoryName )
208- {
209- return new FilterMemory ( bits , more , name , expectedElements , errorRate , hashFunction ) ;
210- }
211-
212- /// <summary>
213- /// Creates a BloomFilter for the specified expected element
214- /// </summary>
215- /// <param name="bits">Sets the bit value</param>
216- /// <param name="expectedElements">The expected elements.</param>
217- /// <param name="errorRate">The error rate.</param>
218- /// <param name="hashFunction">The hash function.</param>
219- /// <param name="name"></param>
220- /// <returns></returns>
221- public static IBloomFilter Build ( BitArray bits , long expectedElements , double errorRate , HashFunction hashFunction , string name = BloomFilterConstValue . DefaultInMemoryName )
222- {
223- return new FilterMemory ( bits , name , expectedElements , errorRate , hashFunction ) ;
224- }
225-
226- /// <summary>
227- /// Creates a BloomFilter for the specified expected element
228- /// </summary>
229- /// <param name="bits">Sets the bit value</param>
230- /// <param name="more">Sets more the bit value</param>
231- /// <param name="expectedElements">The expected elements.</param>
232- /// <param name="errorRate">The error rate.</param>
233- /// <param name="hashFunction">The hash function.</param>
234- /// <param name="name"></param>
235- /// <returns></returns>
236- public static IBloomFilter Build ( BitArray bits , BitArray more , long expectedElements , double errorRate , HashFunction hashFunction , string name = BloomFilterConstValue . DefaultInMemoryName )
237- {
238- return new FilterMemory ( bits , more , name , expectedElements , errorRate , hashFunction ) ;
239- }
240-
24180 /// <summary>
24281 /// Creates a BloomFilter for the specified expected element
24382 /// </summary>
0 commit comments