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

Arak::ArakPrior Class Reference

#include <arak.hpp>

Inheritance diagram for Arak::ArakPrior:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

A standard Arak prior process.

The Arak prior potential is

\[ F(\chi) = 2p \sum_{e \in E} |e| \]

This potential is additively decomposable so the Arak process has the spatial Markov property.

Definition at line 171 of file arak.hpp.

Public Member Functions

 ArakPrior (Coloring &c, double p=1.0)
 Default constructor.

 ArakPrior (Coloring &c, const Arak::Util::PropertyMap &props)
 Constructor.

virtual ~ArakPrior ()
 Destructor.

virtual double scale () const
 Returns the scale of this Arak process.

virtual double logMeasure () const
 Computes the (log) measure associated with the Arak process for the coloring.

virtual double potential () const
 Computes the potential associated with the Arak process.

virtual void recolored (const Geometry::Point &a, const Geometry::Point &b, const Geometry::Point &c)
 This method is invoked to inform this process 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 this process that the quadrilateral with the supplied vertices has been recolored.

virtual void vertexHasBeenAdded (Coloring::VertexHandle vh)
 This method is invoked to inform the listener that a new vertex has been added to the coloring.

virtual void vertexWillBeRemoved (Coloring::VertexHandle vh)
 This method is invoked to inform the listener that an existing vertex is about to be removed from the coloring.

virtual void edgeHasBeenAdded (Coloring::IntEdgeHandle eh)
 This method is invoked to inform the listener that a new (interior) edge has been added to the coloring.

virtual void edgeWillBeRemoved (Coloring::IntEdgeHandle eh)
 This method is invoked to inform the listener that an existing (interior) edge will be removed from the coloring.

virtual void visualize (CGAL::Qt_widget &widget) const
 Renders a graphical representation of an Arak process using the supplied widget.


Protected Member Functions

void initialize ()
 Initializes this Arak process object.


Protected Attributes

double p
 A scale parameter for the Arak process.

double sumLogLengths
 The (cached) sum of log lengths of the edges in the coloring.

double sumLogSines
 The (cached) sum of log sines of the angles in the coloring.

double sumLengths
 The (cached) sum of lengths of the edges in the coloring.


Constructor & Destructor Documentation

Arak::ArakPrior::ArakPrior Coloring c,
double  p = 1.0
[inline]
 

Default constructor.

Parameters:
c The coloring whose probability is evaluated. This is fixed for each process object so that likelihood changes due to coloring updates can be processed efficiently.
p a scale parameter for the Arak process

Definition at line 244 of file arak.hpp.

References initialize().

Arak::ArakPrior::ArakPrior Coloring c,
const Arak::Util::PropertyMap props
[inline]
 

Constructor.

Parameters:
c The coloring whose probability is evaluated. This is fixed for each process object so that likelihood changes due to coloring updates can be processed efficiently.
props a property map that specifies the scale parameter "arak.scale"

Definition at line 258 of file arak.hpp.

References initialize(), p, and Arak::Util::PropertyMap.

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

Destructor.

Definition at line 268 of file arak.hpp.


Member Function Documentation

void ArakPrior::edgeHasBeenAdded Coloring::IntEdgeHandle  eh  )  [virtual]
 

This method is invoked to inform the listener that a new (interior) edge has been added to the coloring.

Parameters:
eh a handle to the new edge

Reimplemented from Arak::Coloring::Listener.

Definition at line 30 of file arak.cpp.

References Arak::Coloring::IntEdgeHandle, Arak::ln(), NEGATIVE_INFINITY, sumLengths, and sumLogLengths.

Referenced by initialize().

void ArakPrior::edgeWillBeRemoved Coloring::IntEdgeHandle  eh  )  [virtual]
 

This method is invoked to inform the listener that an existing (interior) edge will be removed from the coloring.

Parameters:
eh a handle to the edge that will be removed

Reimplemented from Arak::Coloring::Listener.

Definition at line 37 of file arak.cpp.

References Arak::Coloring::IntEdgeHandle, Arak::ln(), NEGATIVE_INFINITY, sumLengths, and sumLogLengths.

void ArakPrior::initialize  )  [protected]
 

Initializes this Arak process object.

Definition at line 9 of file arak.cpp.

References Arak::Coloring::addListener(), edgeHasBeenAdded(), Arak::Coloring::getInteriorEdge(), Arak::Coloring::getVertex(), Arak::Coloring::numInteriorEdges(), Arak::Coloring::numVertices(), sumLengths, sumLogLengths, sumLogSines, and vertexHasBeenAdded().

Referenced by ArakPrior().

double ArakPrior::logMeasure  )  const [virtual]
 

Computes the (log) measure associated with the Arak process for the coloring.

(This is actually multiplied by an elementary Poisson measure over the vertex locations to yield the coloring measure.)

Returns:
the measure of the coloring
See also:
ArakProcess

Implements Arak::ArakProcess.

Definition at line 45 of file arak.cpp.

References Arak::ln(), Arak::Coloring::numInteriorEdges(), p, sumLogLengths, and sumLogSines.

virtual double Arak::ArakPrior::potential  )  const [inline, virtual]
 

Computes the potential associated with the Arak process.

This implementation evaluates to the prior potential. Posterior Arak processes add to this prior potential terms that depend upon the observed data. If the posterior potential is additively decomposable then the posterior Arak process has the spatial Markov property.

Returns:
the potential of the coloring
See also:
ArakProcess

Implements Arak::ArakProcess.

Definition at line 297 of file arak.hpp.

References p, and sumLengths.

virtual void Arak::ArakPrior::recolored const Geometry::Point a,
const Geometry::Point b,
const Geometry::Point c,
const Geometry::Point d
[inline, virtual]
 

This method is invoked to inform this process 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.

Parameters:
a the first vertex of the quadrilateral
b the second vertex of the quadrilateral
c the third vertex of the quadrilateral
d the fourth vertex of the quadrilateral

Reimplemented from Arak::Coloring::Listener.

Definition at line 325 of file arak.hpp.

References Arak::Geometry::Point.

virtual void Arak::ArakPrior::recolored const Geometry::Point a,
const Geometry::Point b,
const Geometry::Point c
[inline, virtual]
 

This method is invoked to inform this process that the triangle with the supplied vertices has been recolored.

Parameters:
a the first vertex of the triangle
b the second vertex of the triangle
c the third vertex of the triangle

Reimplemented from Arak::Coloring::Listener.

Definition at line 309 of file arak.hpp.

References Arak::Geometry::Point.

virtual double Arak::ArakPrior::scale  )  const [inline, virtual]
 

Returns the scale of this Arak process.

Implements Arak::ArakProcess.

Definition at line 273 of file arak.hpp.

References p.

void ArakPrior::vertexHasBeenAdded Coloring::VertexHandle  vh  )  [virtual]
 

This method is invoked to inform the listener that a new vertex has been added to the coloring.

Parameters:
vh a handle to the new vertex

Reimplemented from Arak::Coloring::Listener.

Definition at line 22 of file arak.cpp.

References NEGATIVE_INFINITY, sumLogSines, and Arak::Coloring::VertexHandle.

Referenced by initialize().

void ArakPrior::vertexWillBeRemoved Coloring::VertexHandle  vh  )  [virtual]
 

This method is invoked to inform the listener that an existing vertex is about to be removed from the coloring.

Parameters:
vh a handle to the vertex that will be removed

Reimplemented from Arak::Coloring::Listener.

Definition at line 26 of file arak.cpp.

References NEGATIVE_INFINITY, sumLogSines, and Arak::Coloring::VertexHandle.

virtual void Arak::ArakPrior::visualize CGAL::Qt_widget &  widget  )  const [inline, virtual]
 

Renders a graphical representation of an Arak process using the supplied widget.

This base implementation does nothing, but derived instances that represent posteriors can specialize this method to visualize their observations.

Parameters:
widget the widget on which to visualize the process

Reimplemented from Arak::ArakProcess.

Definition at line 370 of file arak.hpp.


Member Data Documentation

double Arak::ArakPrior::p [protected]
 

A scale parameter for the Arak process.

The expected number of vertices in a region of area $ a $ is $ 4 \pi (ap)^2 $ and the expected number of edges is $ 4ap + 4 \pi (ap)^2 $.

Definition at line 180 of file arak.hpp.

Referenced by ArakPrior(), logMeasure(), potential(), and scale().

double Arak::ArakPrior::sumLengths [protected]
 

The (cached) sum of lengths of the edges in the coloring.

This is equal to

\[ \sum_{e \in E(\gamma)} |e| \]

where $E(\gamma)$ is the set of (non-false) edges in the coloring. This quantity is referenced by the potential, so a cached copy is kept here for efficiency.

Definition at line 226 of file arak.hpp.

Referenced by edgeHasBeenAdded(), edgeWillBeRemoved(), initialize(), and potential().

double Arak::ArakPrior::sumLogLengths [protected]
 

The (cached) sum of log lengths of the edges in the coloring.

This is equal to

\[ \sum_{e \in E(\gamma)} \log |e| \]

where $E(\gamma)$ is the set of (non-false) edges in the coloring. This quantity is referenced by the base measure, so a cached copy is kept here for efficiency.

Definition at line 194 of file arak.hpp.

Referenced by edgeHasBeenAdded(), edgeWillBeRemoved(), initialize(), and logMeasure().

double Arak::ArakPrior::sumLogSines [protected]
 

The (cached) sum of log sines of the angles in the coloring.

This is equal to

\[ \sum_{v \in V(\gamma)} \log \sin(\phi_v) \]

where $V(\gamma)$ is the set of (non-false) vertices in the coloring and $\phi_v$ is either the smaller angle between the two edges incident to $v$ (if $v$ is an interior vertex) or the smaller angle between the only edge incident to $v$ and the boundary tangent (if $v$ is a boundary vertex). This quantity is referenced by the base measure, so a cached copy is kept here for efficiency.

Definition at line 212 of file arak.hpp.

Referenced by initialize(), logMeasure(), vertexHasBeenAdded(), and vertexWillBeRemoved().


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