|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Phase 8 tests for tpl_ca_stochastic_rules.H.
More...
#include <algorithm>#include <array>#include <cstdint>#include <random>#include <vector>#include <gtest/gtest.h>#include <ca-rng.H>#include <ca-traits.H>#include <tpl_ca_concepts.H>#include <tpl_ca_engine.H>#include <tpl_ca_lattice.H>#include <tpl_ca_neighborhood.H>#include <tpl_ca_parallel_engine.H>#include <tpl_ca_rule.H>#include <tpl_ca_stochastic_rules.H>#include <tpl_ca_storage.H>Go to the source code of this file.
Functions | |
| TEST (CAProbabilisticRule, LegacyTwoArgFunctorStillWorks) | |
| TEST (CAProbabilisticRule, ContextualRouteUsesCellSeedDeterminism) | |
| TEST (CAApplyRule, ContextualOverloadIsPickedUp) | |
| TEST (CAApplyRule, FallsBackToLegacyWhenContextNotAccepted) | |
| TEST (CAForestFire, BurningAlwaysBecomesEmpty) | |
| TEST (CAForestFire, TreeIgnitesWhenAnyNeighbourBurns) | |
| TEST (CAForestFire, EmptyStaysEmptyWhenGrowthIsZero) | |
| TEST (CAForestFire, EmptyAlwaysGrowsWhenGrowthIsOne) | |
| TEST (CAForestFire, FireSpreadsOnSmallToroidalLattice) | |
| TEST (CASir, RecoveredStaysRecovered) | |
| TEST (CASir, SusceptibleStaysSWithoutInfectedNeighbours) | |
| TEST (CASir, InfectedAlwaysRecoversAtGammaOne) | |
| TEST (CASir, R0BelowOneExtinguishesEpidemic) | |
| TEST (CAIsingGlauber, FlipProbabilityOneHalfWhenDeltaEnergyZero) | |
| TEST (CAIsingMetropolis, AlwaysFlipsWhenEnergyDecreases) | |
| TEST (CAIsingMetropolis, NeverFlipsWhenEnergyMassivelyIncreases) | |
| TEST (CASchelling, IsolatedAgentStaysPut) | |
| TEST (CASchelling, UnhappyAgentVacates) | |
| TEST (CASchelling, HappyAgentStaysPut) | |
| TEST (CASchelling, EmptyCellFillsWithMajority) | |
| TEST (CAStochasticReproducibility, ForestFireIdenticalAcrossThreadCounts) | |
| TEST (CAStochasticReproducibility, SIRIdenticalAcrossThreadCounts) | |
| TEST (CAStochasticReproducibility, IsingGlauberIdenticalAcrossThreadCounts) | |
| TEST (CAStochasticReproducibility, SchellingIdenticalAcrossThreadCounts) | |
| TEST (CAStochasticReproducibility, SequentialAndParallelMatchForestFire) | |
Phase 8 tests for tpl_ca_stochastic_rules.H.
Coverage:
Probabilistic_Rule legacy 2-arg and Phase 8 3-arg dispatch.apply_rule chooses the contextual overload when available.R0 < 1 extinguishes the epidemic. Definition in file tpl_ca_stochastic_rules_test.cc.
| TEST | ( | CAApplyRule | , |
| ContextualOverloadIsPickedUp | |||
| ) |
Definition at line 207 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::CA::apply_rule(), Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | CAApplyRule | , |
| FallsBackToLegacyWhenContextNotAccepted | |||
| ) |
Definition at line 215 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::CA::apply_rule(), Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | CAForestFire | , |
| BurningAlwaysBecomesEmpty | |||
| ) |
Definition at line 228 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::next().
| TEST | ( | CAForestFire | , |
| EmptyAlwaysGrowsWhenGrowthIsOne | |||
| ) |
Definition at line 259 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CAForestFire | , |
| EmptyStaysEmptyWhenGrowthIsZero | |||
| ) |
Definition at line 249 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CAForestFire | , |
| FireSpreadsOnSmallToroidalLattice | |||
| ) |
Definition at line 269 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and engine.
| TEST | ( | CAForestFire | , |
| TreeIgnitesWhenAnyNeighbourBurns | |||
| ) |
Definition at line 238 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CAIsingGlauber | , |
| FlipProbabilityOneHalfWhenDeltaEnergyZero | |||
| ) |
Definition at line 349 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::Cell_Context< Rank >::coord, and k.
| TEST | ( | CAIsingMetropolis | , |
| AlwaysFlipsWhenEnergyDecreases | |||
| ) |
Definition at line 372 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CAIsingMetropolis | , |
| NeverFlipsWhenEnergyMassivelyIncreases | |||
| ) |
Definition at line 383 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and k.
| TEST | ( | CAProbabilisticRule | , |
| ContextualRouteUsesCellSeedDeterminism | |||
| ) |
Definition at line 146 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CAProbabilisticRule | , |
| LegacyTwoArgFunctorStillWorks | |||
| ) |
Definition at line 128 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and counter.
| TEST | ( | CASchelling | , |
| EmptyCellFillsWithMajority | |||
| ) |
Definition at line 446 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CASchelling | , |
| HappyAgentStaysPut | |||
| ) |
Definition at line 430 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CASchelling | , |
| IsolatedAgentStaysPut | |||
| ) |
Definition at line 402 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CASchelling | , |
| UnhappyAgentVacates | |||
| ) |
Definition at line 412 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CASir | , |
| InfectedAlwaysRecoversAtGammaOne | |||
| ) |
Definition at line 319 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CASir | , |
| R0BelowOneExtinguishesEpidemic | |||
| ) |
Definition at line 329 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::count_state(), and engine.
| TEST | ( | CASir | , |
| RecoveredStaysRecovered | |||
| ) |
Definition at line 296 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CASir | , |
| SusceptibleStaysSWithoutInfectedNeighbours | |||
| ) |
Definition at line 309 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CAStochasticReproducibility | , |
| ForestFireIdenticalAcrossThreadCounts | |||
| ) |
Definition at line 500 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::frames_equal(), and seed.
| TEST | ( | CAStochasticReproducibility | , |
| IsingGlauberIdenticalAcrossThreadCounts | |||
| ) |
Definition at line 537 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::frames_equal(), rng, and seed.
| TEST | ( | CAStochasticReproducibility | , |
| SchellingIdenticalAcrossThreadCounts | |||
| ) |
Definition at line 557 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::frames_equal(), and seed.
| TEST | ( | CAStochasticReproducibility | , |
| SequentialAndParallelMatchForestFire | |||
| ) |
Definition at line 580 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::frame(), Aleph::CA::frames_equal(), Aleph::CA::Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::run(), and seed.
| TEST | ( | CAStochasticReproducibility | , |
| SIRIdenticalAcrossThreadCounts | |||
| ) |
Definition at line 521 of file tpl_ca_stochastic_rules_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::frames_equal(), and seed.