Merge pull request #50 from bitshares/jmj_issue_762

Add parameterized constructor (part of Issue 762)
This commit is contained in:
John M. Jones 2018-05-29 12:46:25 -07:00 committed by GitHub
commit 36359f5895
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,6 +57,20 @@ public:
random_seed(0xA5A5A5A55A5A5A5AULL)
{}
bloom_parameters(unsigned long long int projected_element_count,
double false_positive_probability,
unsigned long long int maximum_size) :
minimum_size(1),
maximum_size(maximum_size),
minimum_number_of_hashes(1),
maximum_number_of_hashes(std::numeric_limits<unsigned int>::max()),
projected_element_count(projected_element_count),
false_positive_probability(false_positive_probability),
random_seed(0xA5A5A5A55A5A5A5AULL)
{
compute_optimal_parameters();
}
virtual ~bloom_parameters()
{}