18 int result_pdf[2], result_cdf[2], result_quant[2];
20 for (
int i = 0; i < 2; ++i) {
33 for (
int i = 0; i < 2; ++i) {
35 std::cout <<
"\nResults for VavilovFast:\n";
38 std::cout <<
"\nResults for VavilovAccurate:\n";
40 std::cout <<
"PdfTest: ";
41 if (result_pdf[i] == 0)
42 std::cout <<
"PASS\n";
44 std::cout <<
"FAIL: " << result_pdf[i] <<
" / 10\n";
45 std::cout <<
"CdfTest: ";
46 if (result_cdf[i] == 0)
47 std::cout <<
"PASS\n";
49 std::cout <<
"FAIL: " << result_cdf[i] <<
" / 10\n";
50 std::cout <<
"QuantileTest: ";
51 if (result_quant[i] == 0)
52 std::cout <<
"PASS\n";
54 std::cout <<
"FAIL: " << result_quant[i] <<
" / 20\n";
56 std::cout <<
"\n\nOverall: ";
58 std::cout <<
"PASS\n";
60 std::cout <<
"FAIL: " << result <<
" / 80\n";
Base class describing a Vavilov distribution.
static int PdfTest(Vavilov &v, std::ostream &os, double maxabsdiff, double maxdiffmantissa, double agreefraction, double agreediffmantissa)
Test the pdf values against the tables of Seltzer and Berger.
Class describing a Vavilov distribution.
static int QuantileTest(Vavilov &v, std::ostream &os, double maxabsdiff)
Test the quantile values against the cdf Returns 0 if the test is passed.
static int CdfTest(Vavilov &v, std::ostream &os, double maxabsdiff, double maxcdfdiff)
Test the cdf values against the integral of the pdf Returns 0 if the test is passed.
Class describing a Vavilov distribution.