Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ca_metrics_test.cc File Reference

Tests for Aleph::CA metric helpers (Phase 7). More...

#include <cmath>
#include <cstdint>
#include <vector>
#include <gtest/gtest.h>
#include <ca-metrics.H>
#include <ca-traits.H>
#include <tpl_ca_concepts.H>
#include <tpl_ca_graph_automaton.H>
#include <tpl_ca_lattice.H>
#include <tpl_ca_storage.H>
Include dependency graph for ca_metrics_test.cc:

Go to the source code of this file.

Functions

 TEST (CAMetrics, CountStateAndCountAliveAreConsistent)
 
 TEST (CAMetrics, DensityIsZeroOnEmptyLattice)
 
 TEST (CAMetrics, DensityMatchesCountOverTotal)
 
 TEST (CAMetrics, StateHistogramSumsToTotal)
 
 TEST (CAMetrics, ShannonEntropyZeroForUniformLattice)
 
 TEST (CAMetrics, ShannonEntropyForBalancedBinaryReachesLn2)
 
 TEST (CAMetrics, FrameHashEqualForEqualFrames)
 
 TEST (CAMetrics, FrameHashDiffersForDifferentFrames)
 
 TEST (CAMetrics, FrameHashStableAcrossLatticeReconstruction)
 
 TEST (CAMetrics, CellDiffCountMatchesActivity)
 
 TEST (CAMetrics, ForEachCellWalksRank1And3LatticesToo)
 
 TEST (CAMetrics, MetricsWorkOnGraphLattice)
 

Detailed Description

Tests for Aleph::CA metric helpers (Phase 7).

Scope:

  • count_state, count_alive, density on rectangular and graph lattices.
  • state_histogram and shannon_entropy edge cases.
  • frame_hash determinism: identical frames hash the same; the hash is stable across an entire test process.
  • frames_equal and cell_diff_count consistency with frame_hash.
  • for_each_cell visits every cell in row-major order.

Definition in file ca_metrics_test.cc.

Function Documentation

◆ TEST() [1/12]

TEST ( CAMetrics  ,
CellDiffCountMatchesActivity   
)

◆ TEST() [2/12]

TEST ( CAMetrics  ,
CountStateAndCountAliveAreConsistent   
)

◆ TEST() [3/12]

TEST ( CAMetrics  ,
DensityIsZeroOnEmptyLattice   
)

◆ TEST() [4/12]

TEST ( CAMetrics  ,
DensityMatchesCountOverTotal   
)

◆ TEST() [5/12]

TEST ( CAMetrics  ,
ForEachCellWalksRank1And3LatticesToo   
)

◆ TEST() [6/12]

TEST ( CAMetrics  ,
FrameHashDiffersForDifferentFrames   
)

◆ TEST() [7/12]

TEST ( CAMetrics  ,
FrameHashEqualForEqualFrames   
)

◆ TEST() [8/12]

TEST ( CAMetrics  ,
FrameHashStableAcrossLatticeReconstruction   
)

◆ TEST() [9/12]

◆ TEST() [10/12]

TEST ( CAMetrics  ,
ShannonEntropyForBalancedBinaryReachesLn2   
)

◆ TEST() [11/12]

TEST ( CAMetrics  ,
ShannonEntropyZeroForUniformLattice   
)

◆ TEST() [12/12]

TEST ( CAMetrics  ,
StateHistogramSumsToTotal   
)