10 #include <tracking/trackFindingVXD/algorithms/TrackerAlgorithmBase.h>
20 template<
class ContainerType,
class Val
idatorType>
36 int apply(ContainerType& aNetworkContainer)
override final
43 unsigned int activeCells = 1,
50 while (activeCells != 0 and caRound <
stopInRound) {
55 for (
auto* aNode : aNetworkContainer) {
56 auto& currentCell = aNode->getMetaInfo();
57 if (currentCell.isActivated() ==
false) {
continue; }
60 for (
auto* aNeighbour : aNode->getInnerNodes()) {
64 if (currentCell != aNeighbour->getMetaInfo())
continue;
68 if (goodNeighbours != 0) {
69 currentCell.setStateUpgrade(
true);
80 for (
auto* aNode : aNetworkContainer) {
81 auto& currentCell = aNode->getMetaInfo();
82 if (currentCell.isActivated() ==
false or currentCell.isUpgradeAllowed() ==
false) {
continue; }
84 currentCell.setStateUpgrade(
false);
85 currentCell.increaseState();
86 if (currentCell.getState() > highestCellState) { highestCellState = currentCell.getState(); }
104 unsigned int findSeeds(ContainerType& aNetworkContainer,
bool strictSeeding =
false) override final
106 unsigned int nSeeds = 0;
107 for (
auto* aNode : aNetworkContainer) {
108 if (strictSeeding && !(aNode->getOuterNodes().empty()))
continue;
111 aNode->getMetaInfo().setSeed(
true);
The CellularAutomaton class This class serves as a functor for the algorithm itself.
CellularAutomaton()
constructor
unsigned int stopInRound
aborts CA after stopInRound iterations - mainly for debugging purposes:
int apply(ContainerType &aNetworkContainer) override final
actual algorithm of Cellular Automaton, returns number of rounds needed to finish or -1 if CA was abo...
unsigned int findSeeds(ContainerType &aNetworkContainer, bool strictSeeding=false) override final
checks network given for seeds, returns number of seeds found (if strictSeeding is set to true,...
base class for TrackerAlgorithms. shall allow a common base for algorithms like the cellular automato...
ValidatorType m_validator
something which checks the quality of the test so far (will be applied by the apply-function
Abstract base class for different kinds of events.