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

Phase 8 tests for ca-rng.H. More...

#include <array>
#include <cstdint>
#include <random>
#include <set>
#include <gtest/gtest.h>
#include <ca-rng.H>
#include <ca-traits.H>
Include dependency graph for ca_rng_test.cc:

Go to the source code of this file.

Functions

 TEST (CARng, SplitMix64IsDistinctForSmallInputs)
 
 TEST (CARng, CellSeedIsSensitiveToCoord)
 
 TEST (CARng, CellSeedIsSensitiveToStep)
 
 TEST (CARng, CellSeedIsSensitiveToMasterSeed)
 
 TEST (CARng, CellSeedIsDeterministic)
 
 TEST (CARng, PerThreadRngForCellIsReproducible)
 
 TEST (CARng, PerThreadRngDifferentForDifferentCells)
 
 TEST (CARng, PerThreadRngContextOverloadMatches)
 
 TEST (CARng, PerThreadRngForThreadStepDistinctSubstreams)
 
 TEST (CARng, UniformUnitInsideHalfOpenInterval)
 
 TEST (CARng, UniformIntInsideRange)
 
 TEST (CARng, UniformIntDegenerateRangeReturnsLow)
 
 TEST (CARng, CellKeyFromCoordIsCoordSensitive)
 

Detailed Description

Phase 8 tests for ca-rng.H.

Coverage:

  • splitmix64 avalanche (small inputs spread across all 64 bits).
  • cell_seed is sensitive to every coordinate component, the step index and the master seed.
  • Per_Thread_RNG::for_cell is deterministic and yields identical streams across invocations.
  • uniform_unit / uniform_int produce values inside the documented ranges.

Definition in file ca_rng_test.cc.

Function Documentation

◆ TEST() [1/13]

TEST ( CARng  ,
CellKeyFromCoordIsCoordSensitive   
)

Definition at line 180 of file ca_rng_test.cc.

References Aleph::blossom_maximum_cardinality_matching().

◆ TEST() [2/13]

TEST ( CARng  ,
CellSeedIsDeterministic   
)

Definition at line 95 of file ca_rng_test.cc.

References Aleph::blossom_maximum_cardinality_matching().

◆ TEST() [3/13]

TEST ( CARng  ,
CellSeedIsSensitiveToCoord   
)

Definition at line 68 of file ca_rng_test.cc.

References Aleph::blossom_maximum_cardinality_matching().

◆ TEST() [4/13]

TEST ( CARng  ,
CellSeedIsSensitiveToMasterSeed   
)

Definition at line 88 of file ca_rng_test.cc.

References Aleph::blossom_maximum_cardinality_matching().

◆ TEST() [5/13]

TEST ( CARng  ,
CellSeedIsSensitiveToStep   
)

Definition at line 81 of file ca_rng_test.cc.

References Aleph::blossom_maximum_cardinality_matching().

◆ TEST() [6/13]

TEST ( CARng  ,
PerThreadRngContextOverloadMatches   
)

Definition at line 125 of file ca_rng_test.cc.

References Aleph::blossom_maximum_cardinality_matching(), and rng.

◆ TEST() [7/13]

TEST ( CARng  ,
PerThreadRngDifferentForDifferentCells   
)

Definition at line 114 of file ca_rng_test.cc.

References Aleph::blossom_maximum_cardinality_matching(), and rng.

◆ TEST() [8/13]

TEST ( CARng  ,
PerThreadRngForCellIsReproducible   
)

Definition at line 104 of file ca_rng_test.cc.

References Aleph::blossom_maximum_cardinality_matching(), and rng.

◆ TEST() [9/13]

TEST ( CARng  ,
PerThreadRngForThreadStepDistinctSubstreams   
)

Definition at line 136 of file ca_rng_test.cc.

References Aleph::blossom_maximum_cardinality_matching(), and rng.

◆ TEST() [10/13]

TEST ( CARng  ,
SplitMix64IsDistinctForSmallInputs   
)

◆ TEST() [11/13]

TEST ( CARng  ,
UniformIntDegenerateRangeReturnsLow   
)

◆ TEST() [12/13]

TEST ( CARng  ,
UniformIntInsideRange   
)

◆ TEST() [13/13]

TEST ( CARng  ,
UniformUnitInsideHalfOpenInterval   
)