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

Arak::PointColorEstimator Class Reference

#include <estimation.hpp>

Inheritance diagram for Arak::PointColorEstimator:

Inheritance graph
[legend]
Collaboration diagram for Arak::PointColorEstimator:

Collaboration graph
[legend]
List of all members.

Detailed Description

An estimator of the color of a point.

Definition at line 45 of file estimation.hpp.

Public Member Functions

 PointColorEstimator (const ArakMarkovChain &chain, const Geometry::Point &point, Color color)
 Constructor.

virtual ~PointColorEstimator ()
 Destructor.

virtual void recolor (Color color)
 Reacts to information that the query point has been recolored.

double estimate () const
 Returns the estimated probability the point is colored black.


Protected Member Functions

void update (Color color, unsigned long int time)
 Updates this estimator to reflect that the color of the point was updated.


Protected Attributes

const ArakMarkovChainchain
 The Markov chain generating the samples used by this estimator.

const Geometry::Point point
 The location at which the color is being estimated.

unsigned long int updated
 The time (in Markov chain samples, not steps) in which the estimator was last updated.

Color color
 This the last color used to update the estimator.

unsigned long int numBlack
 The number of samples in which the point was colored black.

unsigned long int numWhite
 The number of samples in which the point was colored white.


Friends

class PointSetColorEstimator
class GridColorEstimator


Constructor & Destructor Documentation

Arak::PointColorEstimator::PointColorEstimator const ArakMarkovChain chain,
const Geometry::Point point,
Color  color
[inline]
 

Constructor.

Parameters:
chain the Markov chain generating the samples used by this estimator
point the point at which the color is being estimated
color the initial color of the point

Definition at line 113 of file estimation.hpp.

References Arak::ArakMarkovChain, numBlack, numWhite, Arak::Geometry::Point, and updated.

virtual Arak::PointColorEstimator::~PointColorEstimator  )  [inline, virtual]
 

Destructor.

Definition at line 123 of file estimation.hpp.


Member Function Documentation

double Arak::PointColorEstimator::estimate  )  const [inline]
 

Returns the estimated probability the point is colored black.

Definition at line 138 of file estimation.hpp.

References Arak::BLACK, chain, Arak::MarkovChain< MarkovChainTraits >::getNumSamples(), numBlack, numWhite, and updated.

Referenced by Arak::GridColorEstimator::visualize(), Arak::PointSetColorEstimator::visualize(), Arak::GridColorEstimator::write(), and Arak::PointSetColorEstimator::write().

virtual void Arak::PointColorEstimator::recolor Color  color  )  [inline, virtual]
 

Reacts to information that the query point has been recolored.

The estimator is updated.

Parameters:
color the new color of the query point

Implements Arak::QueryPointListener.

Definition at line 131 of file estimation.hpp.

References chain, Arak::MarkovChain< MarkovChainTraits >::getNumSamples(), and update().

Referenced by Arak::GridColorEstimator::recolored().

void Arak::PointColorEstimator::update Color  color,
unsigned long int  time
[inline, protected]
 

Updates this estimator to reflect that the color of the point was updated.

Parameters:
color the new color
time the time at which the change occured

Definition at line 90 of file estimation.hpp.

References Arak::BLACK, numBlack, numWhite, updated, and Arak::WHITE.

Referenced by recolor().


Friends And Related Function Documentation

friend class GridColorEstimator [friend]
 

Definition at line 48 of file estimation.hpp.

friend class PointSetColorEstimator [friend]
 

Definition at line 47 of file estimation.hpp.


Member Data Documentation

const ArakMarkovChain& Arak::PointColorEstimator::chain [protected]
 

The Markov chain generating the samples used by this estimator.

Definition at line 55 of file estimation.hpp.

Referenced by estimate(), and recolor().

Color Arak::PointColorEstimator::color [protected]
 

This the last color used to update the estimator.

Definition at line 71 of file estimation.hpp.

Referenced by Arak::GridColorEstimator::recolored().

unsigned long int Arak::PointColorEstimator::numBlack [protected]
 

The number of samples in which the point was colored black.

Definition at line 76 of file estimation.hpp.

Referenced by estimate(), PointColorEstimator(), and update().

unsigned long int Arak::PointColorEstimator::numWhite [protected]
 

The number of samples in which the point was colored white.

Definition at line 81 of file estimation.hpp.

Referenced by estimate(), PointColorEstimator(), and update().

const Geometry::Point Arak::PointColorEstimator::point [protected]
 

The location at which the color is being estimated.

Definition at line 60 of file estimation.hpp.

Referenced by Arak::GridColorEstimator::recolored(), Arak::PointSetColorEstimator::visualize(), and Arak::PointSetColorEstimator::write().

unsigned long int Arak::PointColorEstimator::updated [protected]
 

The time (in Markov chain samples, not steps) in which the estimator was last updated.

Definition at line 66 of file estimation.hpp.

Referenced by estimate(), PointColorEstimator(), and update().


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