23 std::vector<unsigned int> AtomIdx;
24 std::vector<unsigned int> BondIdx;
30 auto it = std::lower_bound(AtomIdx.begin(), AtomIdx.end(), i);
31 AtomIdx.insert(
it, i);
34 auto it = std::lower_bound(BondIdx.begin(), BondIdx.end(), i);
35 BondIdx.insert(
it, i);
39 return AtomIdx.size() ==
right.AtomIdx.size() &&
40 BondIdx.size() ==
right.BondIdx.size() &&
41 0 == std::memcmp(&AtomIdx[0], &
right.AtomIdx[0],
42 AtomIdx.size() *
sizeof(
unsigned int)) &&
43 0 == std::memcmp(&BondIdx[0], &
right.BondIdx[0],
44 BondIdx.size() *
sizeof(
unsigned int));
48 if (AtomIdx.size() <
right.AtomIdx.size()) {
51 if (AtomIdx.size() >
right.AtomIdx.size()) {
55 if (BondIdx.size() <
right.BondIdx.size()) {
58 if (BondIdx.size() >
right.BondIdx.size()) {
64 diff = std::memcmp(&AtomIdx[0], &
right.AtomIdx[0],
65 AtomIdx.size() *
sizeof(
unsigned int));
72 return std::memcmp(&BondIdx[0], &
right.BondIdx[0],
73 BondIdx.size() *
sizeof(
unsigned int)) < 0;
78 std::map<TKey, TValue> Index;
93 const auto entryit = Index.find(key);
105 Index.insert(std::pair<TKey, bool>(key,
found));
size_t getNumAtoms() const
void addAtom(unsigned int i)
void addBond(unsigned int i)
bool operator==(const TKey &right) const
bool operator<(const TKey &right) const
size_t getNumBonds() const
void add(const TKey &key, TValue found=true)
bool find(const TKey &key, TValue &value) const
bool rdvalue_is(const RDValue_cast_t)