Chemical Data Processing Library C++ API - Version 1.2.0
|
A data type for the storage of element histograms of chemical compounds. More...
#include <ElementHistogram.hpp>
Public Types | |
typedef std::shared_ptr< ElementHistogram > | SharedPointer |
Public Types inherited from CDPL::Util::Map< unsigned int, std::size_t, true > | |
typedef std::shared_ptr< Map > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated Map instances. More... | |
typedef unsigned int | KeyType |
The type of the map's keys. More... | |
typedef std::size_t | ValueType |
The type of the mapped values. More... | |
typedef StorageType::value_type | Entry |
The type of the key/value pairs stored in the map. More... | |
typedef StorageType::const_iterator | ConstEntryIterator |
A constant iterator used to iterate over the entries of the map. More... | |
typedef StorageType::const_reverse_iterator | ConstReverseEntryIterator |
A constant iterator used to iterate backwards over the entries of the map. More... | |
typedef StorageType::iterator | EntryIterator |
A mutable iterator used to iterate over the entries of the map. More... | |
typedef StorageType::reverse_iterator | ReverseEntryIterator |
A mutable iterator used to iterate backwards over the entries of the map. More... | |
Additional Inherited Members | |
Public Member Functions inherited from CDPL::Util::Map< unsigned int, std::size_t, true > | |
Map () | |
Creates an empty map. More... | |
Map (const std::less< unsigned int > &func) | |
Creates an empty map and uses func as key compare function. More... | |
Map (const InputIter &first, const InputIter &last) | |
Creates and initializes the map with copies of the key value pairs in the range [first, last). More... | |
Map (const InputIter &first, const InputIter &last, const std::less< unsigned int > &func) | |
Creates and initializes the map with copies of the key value pairs in the range [first, last) and uses func as key compare function. More... | |
virtual | ~Map () |
Virtual destructor. More... | |
StorageType & | getData () |
const StorageType & | getData () const |
std::size_t | getSize () const |
Returns the size (number of entries) of the map. More... | |
bool | isEmpty () const |
Tells whether the map is empty (getSize() == 0 ). More... | |
void | clear () |
Erases all entries. More... | |
void | swap (Map &map) |
Swaps the contents with map. More... | |
std::less< unsigned int > | getKeyCompareFunction () const |
Returns the key compare function used by the map. More... | |
EntryIterator | getEntry (const unsigned int &key) |
Returns a mutable iterator pointing to the entry specified by key. More... | |
ConstEntryIterator | getEntry (const unsigned int &key) const |
Returns a constant iterator pointing to the entry specified by key. More... | |
bool | containsEntry (const unsigned int &key) const |
Tells whether the map contains an entry with the specified key. More... | |
std::size_t & | getValue (const unsigned int &key) |
Returns a non-const reference to the value associated with the specified key. More... | |
std::size_t & | getValue (const unsigned int &key, std::size_t &def_value) |
Returns a non-const reference to the value associated with the specified key, or the value given by the second argument if the specified entry does not exist. More... | |
const std::size_t & | getValue (const unsigned int &key) const |
Returns a const reference to the value associated with the specified key. More... | |
const std::size_t & | getValue (const unsigned int &key, const std::size_t &def_value) const |
Returns a const reference to the value associated with the specified key, or the value given by the second argument if the specified entry does not exist. More... | |
std::size_t & | operator[] (const unsigned int &key) |
Returns a non-const reference to the value associated with the specified key. More... | |
const std::size_t & | operator[] (const unsigned int &key) const |
Returns a const reference to the value associated with the specified key. More... | |
void | removeEntry (const EntryIterator &it) |
Removes the entry pointed to by the iterator it from the map. More... | |
bool | removeEntry (const unsigned int &key) |
Removes the entry specified by key from the map. More... | |
void | removeEntries (const EntryIterator &first, const EntryIterator &last) |
Removes all entries pointed to by the iterators in the range [first, last) from the map. More... | |
std::pair< EntryIterator, bool > | insertEntry (const Entry &item) |
Tries to insert the key/value pair item into the map. More... | |
std::pair< EntryIterator, bool > | insertEntry (const unsigned int &key, const std::size_t &value) |
Tries to insert a new entry with specified key and value into the map. More... | |
EntryIterator | insertEntry (const EntryIterator &it, const Entry &item) |
Tries to insert the key/value pair item into the map and uses the iterator it as a hint for the insertion location. More... | |
EntryIterator | insertEntry (const EntryIterator &it, const unsigned int &key, const std::size_t &value) |
Tries to insert a new entry with the specified key and value into the map and uses the iterator it as a hint for the insertion location. More... | |
EntryIterator | setEntry (const Entry &item) |
Inserts a new entry or updates the value of an existing entry with the key and value given by item. More... | |
EntryIterator | setEntry (const unsigned int &key, const std::size_t &value) |
Inserts a new entry or updates the value of an existing entry with the specified key and value. More... | |
void | insertEntries (const InputIter &first, const InputIter &last) |
Tries to insert the key/value pairs in the range [first, last). More... | |
void | setEntries (const InputIter &first, const InputIter &last) |
Inserts new entries or updates the value of existing entries using the key/value pairs in the range [first, last). More... | |
EntryIterator | getLowerBound (const unsigned int &key) |
Returns a mutable iterator pointing to the first entry whose key is not less than the specified key. More... | |
ConstEntryIterator | getLowerBound (const unsigned int &key) const |
Returns a constant iterator pointing to the first entry whose key is not less than the specified key. More... | |
EntryIterator | getUpperBound (const unsigned int &key) |
Returns a mutable iterator pointing to the first entry whose key is greater than the specified key. More... | |
ConstEntryIterator | getUpperBound (const unsigned int &key) const |
Returns a constant iterator pointing to the first entry whose key is greater than the specified key. More... | |
ConstEntryIterator | getEntriesBegin () const |
Returns a constant iterator pointing to the beginning of the map. More... | |
EntryIterator | getEntriesBegin () |
Returns a mutable iterator pointing to the beginning of the map. More... | |
ConstEntryIterator | getEntriesEnd () const |
Returns a constant iterator pointing to the end of the map. More... | |
EntryIterator | getEntriesEnd () |
Returns a mutable iterator pointing to the end of the map. More... | |
ConstEntryIterator | begin () const |
Returns a constant iterator pointing to the beginning of the map. More... | |
EntryIterator | begin () |
Returns a mutable iterator pointing to the beginning of the map. More... | |
ConstEntryIterator | end () const |
Returns a constant iterator pointing to the end of the map. More... | |
EntryIterator | end () |
Returns a mutable iterator pointing to the end of the map. More... | |
ConstReverseEntryIterator | getEntriesReverseBegin () const |
Returns a constant iterator pointing to the beginning of the reversed map. More... | |
ReverseEntryIterator | getEntriesReverseBegin () |
Returns a mutable iterator pointing to the beginning of the reversed map. More... | |
ConstReverseEntryIterator | getEntriesReverseEnd () const |
Returns a constant iterator pointing to the end of the reversed map. More... | |
ReverseEntryIterator | getEntriesReverseEnd () |
Returns a mutable iterator pointing to the end of the reversed map. More... | |
A data type for the storage of element histograms of chemical compounds.
ElementHistogram
is an unique associative map where the keys specify the atom type (defined in namespace Chem::AtomType) of the chemical elements and the mapped integer values correspond to the element frequencies.
typedef std::shared_ptr<ElementHistogram> CDPL::MolProp::ElementHistogram::SharedPointer |