class ring::AffiliationUpdater¶
Overview¶
Exact incremental affiliation across frames. More…
#include <src/include/internal/cage_affiliation.hpp>
class AffiliationUpdater {
public:
// construction
AffiliationUpdater();
AffiliationUpdater(AffiliationUpdater&&);
AffiliationUpdater(const AffiliationUpdater&);
~AffiliationUpdater();
// methods
AffiliationUpdater& operator=(AffiliationUpdater&&);
AffiliationUpdater& operator=(const AffiliationUpdater&);
const CageAffiliation& update(const std::vector<std::vector<int>>& rings, const std::vector<std::vector<int>>& nList);
int lastReclassified() const;
void setBatchFraction(double fraction);
};
Detailed Documentation¶
Exact incremental affiliation across frames.
Stores, per six-ring, its passing basal pairs with their prismatic rings and its equatorial result. On a new frame it matches the rings to the previous frame’s and evaluates again only the pairs of rings that are new, hold an atom whose neighbour row changed, or hold or bond an atom of an added or removed ring, and the equatorial test of rings that are new or hold an atom of an added or removed ring. The flags are the unions over the stored answers, identical to cageAffiliation on the new frame.
Methods¶
const CageAffiliation& update(const std::vector<std::vector<int>>& rings, const std::vector<std::vector<int>>& nList)
Classify the frame, reusing the previous frame’s answers outside the locality closure of what changed. The reference stays valid until the next update call.
int lastReclassified() const
Rings whose pairs or equatorial test the last update evaluated again; the first call reports every ring.
void setBatchFraction(double fraction)
Above this fraction of dirty rings, update runs the batch sweep instead (default 0.25; 1 never falls back). After such a frame the next 1, 2, 4, then at most 8 frames run the batch sweep without the diff, while frames keep falling back