A library for working with phylogenetic and population genetic data.
v0.27.0
BitvectorHash Struct Reference

#include <genesis/utils/math/bitvector.hpp>

Detailed Description

Helper structure that yields the hash of a given Bitvector.

It is meant to be used in containers such as unordered_set or unordered_map that can make use of custom hash functions for the key objects. By default, these containers use a specialization of the std::hash template, which we also offer, and that also uses the Bitvector::hash() function.

Hence, this class here is slightly redundant, as it gives the same result as just using the std::hash specialization. Still, it might be useful to have.

See also BitvectorXhash for an alternative version that uses Bitvector::x_hash() instead.

Definition at line 353 of file bitvector.hpp.

Public Member Functions

std::size_t operator() (genesis::utils::Bitvector const &value) const
 

Member Function Documentation

◆ operator()()

std::size_t operator() ( genesis::utils::Bitvector const &  value) const
inline

Definition at line 355 of file bitvector.hpp.


The documentation for this struct was generated from the following file: