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/3]
CDPL::Chem::HashCodeCalculator::HashCodeCalculator |
( |
| ) |
|
Constructs the HashCodeCalculator
instance.
◆ HashCodeCalculator() [2/3]
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. |
◆ HashCodeCalculator() [3/3]
◆ operator=()
◆ 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:=
constexpr unsigned int FORMAL_CHARGE
Specifies the formal charge of an atom.
Definition: Chem/AtomPropertyFlag.hpp:73
constexpr unsigned int H_COUNT
Specifies the hydrogen count of an atom.
Definition: Chem/AtomPropertyFlag.hpp:78
constexpr unsigned int AROMATICITY
Specifies the membership of an atom in aromatic rings.
Definition: Chem/AtomPropertyFlag.hpp:93
constexpr unsigned int ISOTOPE
Specifies the isotopic mass of an atom.
Definition: Chem/AtomPropertyFlag.hpp:68
constexpr unsigned int CIP_CONFIGURATION
Specifies the CIP-configuration of a chiral atom.
Definition: Chem/AtomPropertyFlag.hpp:58
constexpr unsigned int TYPE
Specifies the generic type or element of an atom.
Definition: Chem/AtomPropertyFlag.hpp:63
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:=
constexpr unsigned int AROMATICITY
Specifies the membership of a bond in aromatic rings.
Definition: BondPropertyFlag.hpp:73
constexpr unsigned int ORDER
Specifies the order of a bond.
Definition: BondPropertyFlag.hpp:63
constexpr unsigned int CIP_CONFIGURATION
Specifies the CIP-configuration of a double bond.
Definition: BondPropertyFlag.hpp:58
constexpr unsigned int TOPOLOGY
Specifies the ring/chain topology of a bond.
Definition: BondPropertyFlag.hpp:68
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: