struct smooth::Topology#
Overview#
Candidate rings, shortcut paths and hexagon pairs of one graph. More…
#include <src/include/internal/smooth_cv.hpp>
struct Topology {
// structs
struct HexPair;
// fields
int nAtoms = 0;
int maxRing = 0;
std::vector<std::array<int, 2>> edges;
std::vector<int> adjOff;
std::vector<int> adjAtom;
std::vector<int> adjEdge;
std::vector<int> ringOff {0};
std::vector<int> ringAtoms;
std::vector<int> ringEdges;
std::vector<int> pathOff {0};
std::vector<int> pathEdgeOff {0};
std::vector<int> pathEdges;
std::vector<HexPair> hexPairs;
// methods
int ringCount() const;
int ringSize(int k) const;
int edgeOf(int i, int j) const;
};
Detailed Documentation#
Candidate rings, shortcut paths and hexagon pairs of one graph.
Fixed between neighbour-list rebuilds. Edge e joins edges[e][0] < edges[e][1]. Ring k lists its members in ringAtoms[ringOff[k] .. ringOff[k + 1]], in cycle order from its lowest index toward the lesser of that member’s ring neighbours, and the edge from member t to member t + 1 (cyclically) in ringEdges at the same offsets. The shortcut paths of ring k are paths pathOff[k] .. pathOff[k + 1]; path p is the edge list pathEdges[pathEdgeOff[p] .. pathEdgeOff[p + 1]].
Methods#
int edgeOf(int i, int j) const
Edge id of the pair (i, j), or -1.