27 #ifndef CDPL_MATH_SPARSECONTAINERELEMENT_HPP
28 #define CDPL_MATH_SPARSECONTAINERELEMENT_HPP
40 template <
typename C,
typename K =
typename C::KeyType>
47 typedef typename ContainerType::ValueType
ValueType;
48 typedef typename ContainerType::SizeType
SizeType;
51 typedef typename ContainerType::ArrayType
ArrayType;
103 template <
typename D>
114 template <
typename D>
122 template <
typename D>
141 cntnr.getData().erase(key);
144 std::pair<typename ArrayType::iterator, bool> pos = cntnr.getData().insert(
typename ArrayType::value_type(key, v));
147 pos.first->second = v;
153 typename ArrayType::const_iterator it = cntnr.getData().find(key);
155 if (it == cntnr.getData().end())
166 template <
typename C>
Definition of various preprocessor macros for error checking.
Definition of type traits.
Definition: SparseContainerElement.hpp:42
K KeyType
Definition: SparseContainerElement.hpp:46
SparseContainerElement & operator-=(const D &d)
Definition: SparseContainerElement.hpp:84
SparseContainerElement & operator/=(const D &d)
Definition: SparseContainerElement.hpp:104
ValueType & Reference
Definition: SparseContainerElement.hpp:49
ContainerType::SizeType SizeType
Definition: SparseContainerElement.hpp:48
ContainerType::ValueType ValueType
Definition: SparseContainerElement.hpp:47
SparseContainerElement & operator=(const SparseContainerElement &p)
Definition: SparseContainerElement.hpp:57
SparseContainerElement(ContainerType &c, KeyType key)
Definition: SparseContainerElement.hpp:53
bool operator!=(const D &d) const
Definition: SparseContainerElement.hpp:123
bool operator==(const D &d) const
Definition: SparseContainerElement.hpp:115
SparseContainerElement & operator=(const D &d)
Definition: SparseContainerElement.hpp:66
SparseContainerElement & operator+=(const D &d)
Definition: SparseContainerElement.hpp:74
SparseContainerElement & operator*=(const D &d)
Definition: SparseContainerElement.hpp:94
C ContainerType
Definition: SparseContainerElement.hpp:45
ContainerType::ArrayType ArrayType
Definition: SparseContainerElement.hpp:51
ContainerType::ConstReference ConstReference
Definition: SparseContainerElement.hpp:50
constexpr unsigned int D
Specifies Hydrogen (Deuterium).
Definition: AtomType.hpp:62
constexpr unsigned int K
Specifies Potassium.
Definition: AtomType.hpp:157
constexpr unsigned int C
Specifies Carbon.
Definition: AtomType.hpp:92
constexpr unsigned int p
Specifies that the stereocenter has p configuration.
Definition: CIPDescriptor.hpp:121
The namespace of the Chemical Data Processing Library.
Definition: TypeTraits.hpp:171