#include <estimation.hpp>
Inheritance diagram for Arak::GridColorEstimator:
Definition at line 286 of file estimation.hpp.
Public Member Functions | |
GridColorEstimator (ArakMarkovChain &chain, const Arak::Util::PropertyMap &props) | |
Constructor for a grid of point color estimators. | |
virtual | ~GridColorEstimator () |
Destructor. | |
virtual void | recolored (const Geometry::Point &a, const Geometry::Point &b, const Geometry::Point &c) |
This method is invoked to inform the listener that the triangle with the supplied vertices has been recolored. | |
virtual void | recolored (const Geometry::Point &a, const Geometry::Point &b, const Geometry::Point &c, const Geometry::Point &d) |
This method is invoked to inform the listener that the quadrilateral with the supplied vertices has been recolored. | |
virtual void | visualize (CGAL::Qt_widget &widget) const |
Renders a graphical representation of this grid 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 Types | |
typedef Grid< PointColorEstimator * > | EstimatorGrid |
Protected Attributes | |
const ArakMarkovChain & | chain |
The Markov chain generating the samples used in estimation. | |
std::list< PointColorEstimator * > | estimators |
A list of the point color estimators. | |
EstimatorGrid * | grid |
An index of the query points at whose locations the color is estimated. |
|
Definition at line 303 of file estimation.hpp. Referenced by GridColorEstimator(). |
|
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.
Definition at line 42 of file estimation.cpp. References Arak::ArakMarkovChain, Arak::Color, EstimatorGrid, Arak::Grid< ItemType >::getCell(), Arak::MarkovChain< MarkovChainTraits >::getState(), grid, Arak::Geometry::Point, Arak::Util::PropertyMap, and Arak::Geometry::Rectangle. |
|
Destructor.
Definition at line 330 of file estimation.hpp. References grid. |
|
This method is invoked to inform the listener that the quadrilateral with the supplied vertices has been recolored. The vertices are supplied in either clockwise or counter-clockwise order. Note that this quadrilateral is simple, but not necessarily convex.
Reimplemented from Arak::Coloring::Listener. Definition at line 363 of file estimation.hpp. References Arak::Geometry::Point, and recolored(). |
|
This method is invoked to inform the listener that the triangle with the supplied vertices has been recolored.
Reimplemented from Arak::Coloring::Listener. Definition at line 70 of file estimation.cpp. References Arak::PointColorEstimator::color, grid, Arak::opposite(), Arak::PointColorEstimator::point, Arak::Geometry::Point, Arak::PointColorEstimator::recolor(), and Arak::Geometry::Triangle. Referenced by recolored(). |
|
Renders a graphical representation of this grid color estimator using the supplied widget. The point color estimates are rendered as squares of varying gray level.
Definition at line 82 of file estimation.cpp. References Arak::PointColorEstimator::estimate(), Arak::Grid< ItemType >::getCell(), grid, Arak::Grid< ItemType >::numCols(), and Arak::Grid< ItemType >::numRows(). Referenced by Arak::ColoringQTLayer::draw(), and Arak::operator<<(). |
|
Writes an ASCII representation of the current estimates to the supplied stream. The first line gives the number of samples used in estimation; the second gives the number of rows and columns of the grid; the third line is the boundary of the grid. Then the estimates are written out as a matrix (one line per row) in reverse-row order (so the first element corresponds to the upper left corner of the grid). Each estimate is the probability the cell's center point is black.
Definition at line 395 of file estimation.hpp. References Arak::Grid< ItemType >::boundary(), Arak::PointColorEstimator::estimate(), Arak::Grid< ItemType >::getCell(), Arak::MarkovChain< MarkovChainTraits >::getNumSamples(), grid, GRID_ESTIMATE_HEADER, Arak::Grid< ItemType >::numCols(), and Arak::Grid< ItemType >::numRows(). |
|
The Markov chain generating the samples used in estimation.
Definition at line 293 of file estimation.hpp. |
|
A list of the point color estimators.
Definition at line 298 of file estimation.hpp. |
|
An index of the query points at whose locations the color is estimated.
Definition at line 309 of file estimation.hpp. Referenced by GridColorEstimator(), recolored(), visualize(), write(), and ~GridColorEstimator(). |