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

The random generators make, for a seed, what they made with GSL. More...

#include <gtest/gtest.h>
#include <Karger.H>
#include <ah-random.H>
#include <bloom-filter.H>
#include <euclidian-graph-common.H>
#include <hash-fct.H>
#include <random_graph.H>
#include <random_net.H>
#include <random_tree.H>
#include <reservoir-sampling.H>
#include <tpl_graph.H>
#include <tpl_net.H>
#include <tpl_sgraph.H>
#include <algorithm>
#include <cstdint>
#include <cstdio>
#include <limits>
#include <stdexcept>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>
Include dependency graph for random_generators_test.cc:

Go to the source code of this file.

Functions

 TEST (RandomGenerators, WhatTheyMadeWithGsl)
 
 TEST (RandomGenerators, TheGeneratorsAreNotCopied)
 
 TEST (RandomGenerators, AKargerKeepsItsGeneratorWhenTheMoveOfItsFilterThrows)
 
 TEST (RandomGenerators, TheEuclideanGeneratorClearsItsGenerator)
 
 TEST (RandomGenerators, AReservoirRefusesTheElementsThatItsGeneratorCannotPlace)
 
 TEST (RandomGenerators, TheSeedsOfABloomFilterAreTheNumbersOfGsl)
 
 TEST (RandomGenerators, TheTableOfJswHashHasTheNumbersOfGsl)
 
 TEST (RandomGenerators, TheSampleOfAReservoirIsThatOfGsl)
 

Detailed Description

The random generators make, for a seed, what they made with GSL.

The random graphs and digraphs, the random networks, the random trees, the cuts of Karger, the seeds of a Bloom filter, the samples of a reservoir, the Euclidean graphs and the table of jsw_hash() took their numbers from GSL, and take them now from a Gsl_Compatible_Rng. For six seeds, what each one makes must be what it made before: each line of output is compared, by its FNV-1a hash, with the one of GSL. The real numbers are written with six digits, so that a last bit of the logarithm of another C library does not change a line.

Definition in file random_generators_test.cc.

Function Documentation

◆ TEST() [1/8]

TEST ( RandomGenerators  ,
AKargerKeepsItsGeneratorWhenTheMoveOfItsFilterThrows   
)

Definition at line 518 of file random_generators_test.cc.

References k, and seed.

◆ TEST() [2/8]

TEST ( RandomGenerators  ,
AReservoirRefusesTheElementsThatItsGeneratorCannotPlace   
)

◆ TEST() [3/8]

TEST ( RandomGenerators  ,
TheEuclideanGeneratorClearsItsGenerator   
)

Definition at line 543 of file random_generators_test.cc.

References Aleph::rand_gen.

◆ TEST() [4/8]

TEST ( RandomGenerators  ,
TheGeneratorsAreNotCopied   
)

Definition at line 470 of file random_generators_test.cc.

◆ TEST() [5/8]

TEST ( RandomGenerators  ,
TheSampleOfAReservoirIsThatOfGsl   
)

Definition at line 645 of file random_generators_test.cc.

◆ TEST() [6/8]

TEST ( RandomGenerators  ,
TheSeedsOfABloomFilterAreTheNumbersOfGsl   
)

Definition at line 635 of file random_generators_test.cc.

◆ TEST() [7/8]

TEST ( RandomGenerators  ,
TheTableOfJswHashHasTheNumbersOfGsl   
)

Definition at line 640 of file random_generators_test.cc.

◆ TEST() [8/8]

TEST ( RandomGenerators  ,
WhatTheyMadeWithGsl   
)

Definition at line 359 of file random_generators_test.cc.

References Aleph::and, and k.