RandomLib
1.10
|
Coverage test for RandomLib. More...
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <RandomLib/Random.hpp>
#include <RandomLib/NormalDistribution.hpp>
#include <RandomLib/ExponentialDistribution.hpp>
#include <RandomLib/RandomSelect.hpp>
#include <RandomLib/LeadingZeros.hpp>
#include <RandomLib/ExponentialProb.hpp>
#include <RandomLib/RandomNumber.hpp>
#include <RandomLib/UniformInteger.hpp>
#include <RandomLib/ExactExponential.hpp>
#include <RandomLib/ExactNormal.hpp>
#include <RandomLib/DiscreteNormal.hpp>
#include <RandomLib/DiscreteNormalAlt.hpp>
#include <RandomLib/ExactPower.hpp>
#include <RandomLib/InversePiProb.hpp>
#include <RandomLib/InverseEProb.hpp>
Go to the source code of this file.
Macros | |
#define | repeat for (int i = 0; i < 1000; ++i) |
Functions | |
void | coverage32 () |
void | coverage64 () |
int | main (int, char **) |
Coverage test for RandomLib.
Compile/link with, e.g.,
g++ -I../include -O2 -funroll-loops -o RandomCoverage RandomCoverage.cpp ../src/Random.cpp
./RandomCoverage
This executes nearly all of the public functions in RandomLib. This is important, since it allows the compiler to check the code which appears in header files. It also shows how templated functions can be invoked.
Copyright (c) Charles Karney (2006-2012) charl and licensed under the MIT/X11 License. For more information, see es@k arney .comhttp://randomlib.sourceforge.net/
Definition in file RandomCoverage.cpp.
#define repeat for (int i = 0; i < 1000; ++i) |
Definition at line 39 of file RandomCoverage.cpp.
Referenced by coverage32(), and coverage64().
void coverage32 | ( | ) |
Definition at line 41 of file RandomCoverage.cpp.
References RandomLib::UniformInteger< IntType, bits >::Add(), RandomLib::RandomNumber< bits >::AddInteger(), RandomLib::RandomNumber< bits >::Ceiling(), RandomLib::RandomNumber< bits >::Digit(), RandomLib::UniformInteger< IntType, bits >::Entropy(), RandomLib::RandomNumber< bits >::Floor(), RandomLib::RandomNumber< bits >::Fraction(), RandomLib::UniformInteger< IntType, bits >::GreaterThan(), RandomLib::UniformInteger< IntType, bits >::GreaterThanEqual(), RandomLib::RandomNumber< bits >::Init(), RandomLib::RandomSelect< NumericType >::Init(), RandomLib::RandomNumber< bits >::LessThan(), RandomLib::UniformInteger< IntType, bits >::LessThan(), RandomLib::UniformInteger< IntType, bits >::LessThanEqual(), RandomLib::UniformInteger< IntType, bits >::Max(), RandomLib::UniformInteger< IntType, bits >::Min(), RandomLib::RandomNumber< bits >::Negate(), RandomLib::UniformInteger< IntType, bits >::Negate(), RandomLib::RandomNumber< bits >::Range(), RandomLib::RandomNumber< bits >::RawDigit(), repeat, RandomLib::RandomNumber< bits >::Sign(), RandomLib::RandomNumber< bits >::Size(), std::swap(), and RandomLib::RandomNumber< bits >::Value().
Referenced by main().
void coverage64 | ( | ) |
Definition at line 313 of file RandomCoverage.cpp.
References RandomLib::UniformInteger< IntType, bits >::Add(), RandomLib::RandomNumber< bits >::AddInteger(), RandomLib::RandomNumber< bits >::Ceiling(), RandomLib::RandomNumber< bits >::Digit(), RandomLib::UniformInteger< IntType, bits >::Entropy(), RandomLib::RandomNumber< bits >::Floor(), RandomLib::RandomNumber< bits >::Fraction(), RandomLib::UniformInteger< IntType, bits >::GreaterThan(), RandomLib::UniformInteger< IntType, bits >::GreaterThanEqual(), RandomLib::RandomNumber< bits >::Init(), RandomLib::RandomSelect< NumericType >::Init(), RandomLib::RandomNumber< bits >::LessThan(), RandomLib::UniformInteger< IntType, bits >::LessThan(), RandomLib::UniformInteger< IntType, bits >::LessThanEqual(), RandomLib::UniformInteger< IntType, bits >::Max(), RandomLib::UniformInteger< IntType, bits >::Min(), RandomLib::RandomNumber< bits >::Negate(), RandomLib::UniformInteger< IntType, bits >::Negate(), RandomLib::RandomNumber< bits >::Range(), RandomLib::RandomNumber< bits >::RawDigit(), repeat, RandomLib::RandomNumber< bits >::Sign(), RandomLib::RandomNumber< bits >::Size(), std::swap(), and RandomLib::RandomNumber< bits >::Value().
Referenced by main().
int main | ( | int | , |
char ** | |||
) |
Definition at line 585 of file RandomCoverage.cpp.
References coverage32(), coverage64(), RandomLib::RandomEngine< Algorithm, Mixer >::Name(), and RandomLib::RandomEngine< Algorithm, Mixer >::SetCount().