#include <verification.hpp>
Comparing these estimates to the true values gives a verification test for the correctness of the implementation: if the estimates do not converge to their true values the implementation is incorrect. (Of course, convergence to the correct values is necessary but not sufficient for correctness.)
The critical statistics that are estimated are:
Definition at line 29 of file verification.hpp.
Public Member Functions | |
CriticalStatsEstimator () | |
Default constructor. | |
CriticalStatsEstimator (int k, const Coloring &c, Arak::Util::Random &random=Arak::Util::default_random) | |
Constructor. | |
void | update (const Coloring &c) |
Updates this estimator with a new sample. | |
template<typename charT, typename traits> void | report (const Geometry::Rectangle &boundary, double scale, std::basic_ostream< charT, traits > &out) const |
Writes a report to the supplied output stream. | |
Protected Attributes | |
unsigned long int | n |
The number of samples used to update this estimator. | |
unsigned long int | sumIntVertices |
The sum of the number of interior vertices of the samples. | |
unsigned long int | sumIntEdges |
The sum of the number of interior edges of the samples. | |
unsigned long int | sumBdVertices [4] |
The sum of the number of boundary vertices on each face of the boundary. | |
std::vector< Geometry::Segment > | testSegments |
A set of test segments that lie in the interior of the coloring. | |
std::vector< unsigned long int > | sumCrossings |
The sum of the number of edge crossings for each test segment. |
|
Default constructor. No test segments are used. Definition at line 74 of file verification.hpp. References n, sumBdVertices, sumIntEdges, and sumIntVertices. |
|
Constructor.
Definition at line 89 of file verification.hpp. References n, Arak::Geometry::Point, Arak::Coloring::randomPoint(), Arak::Geometry::Segment, sumBdVertices, sumCrossings, sumIntEdges, sumIntVertices, and testSegments. |
|
Writes a report to the supplied output stream.
Definition at line 119 of file verification.hpp. References n, Arak::Geometry::Rectangle, Arak::Geometry::Segment, sumBdVertices, sumCrossings, sumIntEdges, sumIntVertices, and testSegments. |
|
Updates this estimator with a new sample.
Definition at line 8 of file verification.cpp. References Arak::Coloring::getInteriorEdgeIndex(), Arak::Coloring::getVertex(), Arak::Coloring::IntEdgeHandle, Arak::Coloring::InteriorEdgeIndex, n, Arak::Coloring::numInteriorEdges(), Arak::Coloring::numVertices(), Arak::Geometry::Segment, sumBdVertices, sumCrossings, sumIntEdges, sumIntVertices, testSegments, and Arak::Coloring::VertexHandle. |
|
The number of samples used to update this estimator.
Definition at line 36 of file verification.hpp. Referenced by CriticalStatsEstimator(), report(), and update(). |
|
The sum of the number of boundary vertices on each face of the boundary. These estimates are coindexed with the preceeding corner vertex index: sumBdVertices[i] corresponds to the boundary face linking corners i and i + 1 (mod 4) of the coloring samples. Definition at line 55 of file verification.hpp. Referenced by CriticalStatsEstimator(), report(), and update(). |
|
The sum of the number of edge crossings for each test segment. This vector is coindexed with testSegments. Definition at line 67 of file verification.hpp. Referenced by CriticalStatsEstimator(), report(), and update(). |
|
The sum of the number of interior edges of the samples.
Definition at line 46 of file verification.hpp. Referenced by CriticalStatsEstimator(), report(), and update(). |
|
The sum of the number of interior vertices of the samples.
Definition at line 41 of file verification.hpp. Referenced by CriticalStatsEstimator(), report(), and update(). |
|
A set of test segments that lie in the interior of the coloring.
Definition at line 61 of file verification.hpp. Referenced by CriticalStatsEstimator(), report(), and update(). |