Type used to refer to particular bonds. Orders first < second. More...
#include <Types.h>
Public Types | |
using | const_iterator = const AtomIndex * |
Public Member Functions | |
BondIndex () | |
Default constructor, leaves members uninitialized. | |
BondIndex (AtomIndex a, AtomIndex b) noexcept | |
Component constructor, establishes ordering. | |
bool | contains (AtomIndex a) const |
Whether first or second is a . | |
bool | operator< (const BondIndex &other) const |
Lexicographic comparison. | |
bool | operator== (const BondIndex &other) const |
Lexicographic comparison. | |
const_iterator | begin () const |
Returns the address of first. | |
const_iterator | end () const |
Returns the address past second. | |
Data Fields | |
AtomIndex | first |
Smaller atom index. | |
AtomIndex | second |
Larger atom index. | |
Type used to refer to particular bonds. Orders first < second.
using Scine::Molassembler::BondIndex::const_iterator = const AtomIndex* |
Iterator type is just a pointer to member
Since the standard guarantees that struct members are laid out successively in memory, we can implement an iterator using just pointers. It doesn't have the necessary typedefs for STL algorithms, but could be useful just the same.