36 int apply(ContainerType& aNetworkContainer)
override final
43 unsigned int activeCells = 1,
49 while (activeCells != 0 and caRound <
stopInRound) {
54 for (
auto* aNode : aNetworkContainer) {
55 auto& currentCell = aNode->getMetaInfo();
56 if (currentCell.isActivated() ==
false) {
continue; }
59 for (
auto* aNeighbour : aNode->getInnerNodes()) {
63 if (currentCell != aNeighbour->getMetaInfo())
continue;
67 if (goodNeighbours != 0) {
68 currentCell.setStateUpgrade(
true);
74 for (
auto* aNode : aNetworkContainer) {
75 auto& currentCell = aNode->getMetaInfo();
76 if (currentCell.isActivated() ==
false or currentCell.isUpgradeAllowed() ==
false) {
continue; }
78 currentCell.setStateUpgrade(
false);
79 currentCell.increaseState();
80 if (currentCell.getState() > highestCellState) { highestCellState = currentCell.getState(); }
98 unsigned int findSeeds(ContainerType& aNetworkContainer,
bool strictSeeding =
false) override final
100 unsigned int nSeeds = 0;
101 for (
auto* aNode : aNetworkContainer) {
102 if (strictSeeding && !(aNode->getOuterNodes().empty()))
continue;
105 aNode->getMetaInfo().setSeed(
true);