[#CBloomFilter-2constructor-0b]
= xref:CBloomFilter.adoc[CBloomFilter]::CBloomFilter
:relfileprefix: ../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;common&sol;bloom&period;h&gt;`

Construct an empty filter with no data and no hash functions&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:CBloomFilter/2constructor-04.adoc[CBloomFilter]();
----

[.small]#xref:CBloomFilter/2constructor-04.adoc[_» more&period;&period;&period;_]#

Creates a new bloom filter which will provide the given fp rate when filled with the given number of elements Note that if the given parameters will result in a filter outside the bounds of the protocol limits, the filter created will be as close to the given parameters as possible within the protocol limits&period; This will apply if nFPRate is very low or nElements is unreasonably high&period; nTweak is a constant which is added to the seed value passed to the hash function It should generally always be a random value (and is largely only exposed for unit testing) nFlags should be one of the BLOOM&lowbar;UPDATE&lowbar;&ast; enums (not &lowbar;MASK)


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:CBloomFilter/2constructor-05.adoc[CBloomFilter](
    unsigned int nElements,
    double nFPRate,
    unsigned int nTweak,
    unsigned char nFlagsIn);
----

[.small]#xref:CBloomFilter/2constructor-05.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *nElements*
| Expected number of elements the filter will hold&period;
| *nFPRate*
| Desired false&hyphen;positive rate&period;
| *nTweak*
| Constant added to the hash seed to randomize the filter&period;
| *nFlagsIn*
| One of the BLOOM&lowbar;UPDATE&lowbar;&ast; flags controlling update behavior&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
