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

Arak::PointSetColorEstimator Class Reference

#include <estimation.hpp>

Inheritance diagram for Arak::PointSetColorEstimator:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

A set of point color estimators at arbitrary locations.

(For a grid of estimates, use GridColorEstimator instead.)

Definition at line 157 of file estimation.hpp.

Public Member Functions

 PointSetColorEstimator (ArakMarkovChain &chain, const Arak::Util::PropertyMap &props)
 Constructor for a grid of point color estimators.

virtual ~PointSetColorEstimator ()
 Destructor.

virtual PointColorEstimatorcreate (const QueryPoint &p)
 Creates a new listener for the supplied point.

virtual void visualize (CGAL::Qt_widget &widget) const
 Renders a graphical representation of this point set color estimator using the supplied widget.

template<typename charT, typename traits> void write (std::basic_ostream< charT, traits > &out) const
 Writes an ASCII representation of the current estimates to the supplied stream.


Protected Attributes

const ArakMarkovChainchain
 The Markov chain generating the samples used in estimation.

std::list< PointColorEstimator * > estimators
 A list of the point color estimators.

QueryPointIndexindex
 An index of the query points at whose locations the color is estimated.


Constructor & Destructor Documentation

PointSetColorEstimator::PointSetColorEstimator ArakMarkovChain chain,
const Arak::Util::PropertyMap props
 

Constructor for a grid of point color estimators.

This constructor uses the properties "arak.mcmc.estimation.avg_grid.rows" and "arak.mcmc.estimation.avg_grid.cols" to define a grid of points at which the color is estimated.

Parameters:
chain the Markov chain generating the samples used for estimation
props a properties map

Definition at line 7 of file estimation.cpp.

References Arak::QueryPointIndex::addListeners(), Arak::ArakMarkovChain, Arak::MarkovChain< MarkovChainTraits >::getState(), Arak::Util::PropertyMap, and Arak::Geometry::Rectangle.

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

Destructor.

Definition at line 196 of file estimation.hpp.

References estimators.


Member Function Documentation

virtual PointColorEstimator* Arak::PointSetColorEstimator::create const QueryPoint p  )  [inline, virtual]
 

Creates a new listener for the supplied point.

Implements Arak::QueryPointListenerFactory.

Definition at line 209 of file estimation.hpp.

References Arak::QueryPoint::color(), and estimators.

void PointSetColorEstimator::visualize CGAL::Qt_widget &  widget  )  const [virtual]
 

Renders a graphical representation of this point set color estimator using the supplied widget.

The point color estimates are rendered as squares of varying gray level.

Todo:
Use a Qt image rendering method
Parameters:
widget the widget on which to visualize the estimates

Definition at line 26 of file estimation.cpp.

References Arak::PointColorEstimator::estimate(), estimators, and Arak::PointColorEstimator::point.

Referenced by Arak::operator<<().

template<typename charT, typename traits>
void Arak::PointSetColorEstimator::write std::basic_ostream< charT, traits > &  out  )  const [inline]
 

Writes an ASCII representation of the current estimates to the supplied stream.

Each line is "x y p" where (x, y) is the coordinate of the point and p is the probability the point is black.

Parameters:
out the stream on which to write the estimates

Definition at line 236 of file estimation.hpp.

References Arak::PointColorEstimator::estimate(), estimators, Arak::MarkovChain< MarkovChainTraits >::getNumSamples(), Arak::PointColorEstimator::point, and POINT_SET_ESTIMATE_HEADER.


Member Data Documentation

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

The Markov chain generating the samples used in estimation.

Definition at line 164 of file estimation.hpp.

std::list<PointColorEstimator*> Arak::PointSetColorEstimator::estimators [protected]
 

A list of the point color estimators.

Definition at line 169 of file estimation.hpp.

Referenced by create(), visualize(), write(), and ~PointSetColorEstimator().

QueryPointIndex* Arak::PointSetColorEstimator::index [protected]
 

An index of the query points at whose locations the color is estimated.

Definition at line 175 of file estimation.hpp.


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