Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Arak::CriticalStatsEstimator Class Reference

#include <verification.hpp>

List of all members.


Detailed Description

An object which estimates several critical statistics whose true values are known for the Arak process.

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::SegmenttestSegments
 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.


Constructor & Destructor Documentation

Arak::CriticalStatsEstimator::CriticalStatsEstimator  )  [inline]
 

Default constructor.

No test segments are used.

Definition at line 74 of file verification.hpp.

References n, sumBdVertices, sumIntEdges, and sumIntVertices.

Arak::CriticalStatsEstimator::CriticalStatsEstimator int  k,
const Coloring c,
Arak::Util::Random random = Arak::Util::default_random
[inline]
 

Constructor.

Parameters:
k the number of random test segments
c the coloring for which the estimates are computed
random a source of pseudo-randomness

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.


Member Function Documentation

template<typename charT, typename traits>
void Arak::CriticalStatsEstimator::report const Geometry::Rectangle boundary,
double  scale,
std::basic_ostream< charT, traits > &  out
const [inline]
 

Writes a report to the supplied output stream.

Parameters:
boundary the boundary of the colored region
scale the scale of the Arak process
out the stream to which the report is written

Definition at line 119 of file verification.hpp.

References n, Arak::Geometry::Rectangle, Arak::Geometry::Segment, sumBdVertices, sumCrossings, sumIntEdges, sumIntVertices, and testSegments.

void CriticalStatsEstimator::update const Coloring c  ) 
 

Updates this estimator with a new sample.

Parameters:
c the 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.


Member Data Documentation

unsigned long int Arak::CriticalStatsEstimator::n [protected]
 

The number of samples used to update this estimator.

Definition at line 36 of file verification.hpp.

Referenced by CriticalStatsEstimator(), report(), and update().

unsigned long int Arak::CriticalStatsEstimator::sumBdVertices[4] [protected]
 

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().

std::vector<unsigned long int> Arak::CriticalStatsEstimator::sumCrossings [protected]
 

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().

unsigned long int Arak::CriticalStatsEstimator::sumIntEdges [protected]
 

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().

unsigned long int Arak::CriticalStatsEstimator::sumIntVertices [protected]
 

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().

std::vector<Geometry::Segment> Arak::CriticalStatsEstimator::testSegments [protected]
 

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().


The documentation for this class was generated from the following files:
Generated on Wed May 25 14:41:37 2005 for Arak by doxygen 1.3.6