HashCodeCalculator.
More...
#include <HashCodeCalculator.hpp>
|
typedef std::function< std::uint64_t(const Atom &)> | AtomHashSeedFunction |
| Type of the generic functor class used to store user-defined functions or function objects for the generation of initial atom hash codes. More...
|
|
typedef std::function< std::uint64_t(const Bond &)> | BondHashSeedFunction |
| Type of the generic functor class used to store user-defined functions or function objects for the generation of initial bond hash codes. More...
|
|
|
static constexpr unsigned int | DEF_ATOM_PROPERTY_FLAGS |
| Specifies the default set of atomic properties considered in the generation of initial atom hash codes by HashCodeCalculator::DefAtomHashSeedFunction. More...
|
|
static constexpr unsigned int | DEF_BOND_PROPERTY_FLAGS |
| Specifies the default set of bond properties considered in the generation of initial bond hash codes by HashCodeCalculator::DefBondHashSeedFunction. More...
|
|
◆ AtomHashSeedFunction
Type of the generic functor class used to store user-defined functions or function objects for the generation of initial atom hash codes.
Functions or function objects for the generation of atom hash seeds are required to take the atom (as a const
reference to Chem::Atom) as argument and return the hash seed as an integer of type std::uint64_t
(see [FUNWRP]).
◆ BondHashSeedFunction
Type of the generic functor class used to store user-defined functions or function objects for the generation of initial bond hash codes.
Functions or function objects for the generation of bond hash seeds are required to take the bond (as a const
reference to Chem::Bond) as argument and return the hash seed as an integer of type std::uint64_t
(see [FUNWRP]).
◆ HashCodeCalculator() [1/2]
CDPL::Chem::HashCodeCalculator::HashCodeCalculator |
( |
| ) |
|
Constructs the HashCodeCalculator
instance.
◆ HashCodeCalculator() [2/2]
CDPL::Chem::HashCodeCalculator::HashCodeCalculator |
( |
const MolecularGraph & |
molgraph | ) |
|
Constructs the HashCodeCalculator
instance and calculates the hash code of the molecular graph molgraph.
The calculated hash code can be retrieved by a call to getResult().
- Parameters
-
molgraph | The molecular graph for which the hash code has to be calculated. |
◆ setAtomHashSeedFunction()
◆ setBondHashSeedFunction()
◆ calculate()
std::uint64_t CDPL::Chem::HashCodeCalculator::calculate |
( |
const MolecularGraph & |
molgraph | ) |
|
Calculates the hash code of the molecular graph molgraph.
- Parameters
-
molgraph | The molecular graph for which to calculate the hash code. |
- Returns
- The hash code of the molecular graph molgraph.
◆ getResult()
std::uint64_t CDPL::Chem::HashCodeCalculator::getResult |
( |
| ) |
const |
Returns the result of the last hash code calculation.
- Returns
- The result of the last hash code calculation, or zero if a calculation has not yet been performed.
◆ DEF_ATOM_PROPERTY_FLAGS
constexpr unsigned int CDPL::Chem::HashCodeCalculator::DEF_ATOM_PROPERTY_FLAGS |
|
staticconstexpr |
Initial value:
Specifies the default set of atomic properties considered in the generation of initial atom hash codes by HashCodeCalculator::DefAtomHashSeedFunction.
◆ DEF_BOND_PROPERTY_FLAGS
constexpr unsigned int CDPL::Chem::HashCodeCalculator::DEF_BOND_PROPERTY_FLAGS |
|
staticconstexpr |
Initial value:
Specifies the default set of bond properties considered in the generation of initial bond hash codes by HashCodeCalculator::DefBondHashSeedFunction.
The documentation for this class was generated from the following file: