LiTe
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
Energy Class Reference

Energy of a Gibbsian random T-tessellation. More...

#include <ttessel.h>

Public Member Functions

TTesselget_ttessel ()
 Return the pointer to the associated TTessel object.
 
double get_value ()
 Return the current value of the energy for the associated T-tessellation.
 
CatVector get_theta ()
 Return the theta parameter.
 
void set_theta (CatVector par)
 Set the theta parameter.
 
void add_value (double delta)
 Increment the current value of the energy.
 
void set_ttessel (TTessel *)
 Define the T-tessellation whose energy is to be monitored. More...
 
double variation (TTessel::Modification &)
 Compute the energy variation. More...
 
CatVector statistic_variation (TTessel::Modification &)
 Compute the statistic variation. More...
 
void add_theta_vertices (double)
 Add a theta component for a vertex feature in the energy formula. More...
 
void add_theta_edges (double)
 Add a theta component for a edge feature in the energy formula. More...
 
void add_theta_faces (double)
 Add a theta component for a face feature in the energy formula. More...
 
void add_theta_segs (double)
 Add a theta component for a segment feature in the energy formula. More...
 
void del_theta_vertices ()
 Remove all theta components associated with vertex features.
 
void del_theta_edges ()
 Remove all theta components associated with edge features.
 
void del_theta_faces ()
 Remove all theta components associated with face features.
 
void del_theta_segs ()
 Remove all theta components associated with segment features.
 
void add_features_vertices (double(*)(Point2, TTessel *))
 Add a vertex feature in the energy formula. More...
 
void add_features_edges (double(*)(Segment, TTessel *))
 Add an edge feature in the energy formula. More...
 
void add_features_faces (double(*)(Polygon, TTessel *))
 Add a face feature in the energy formula. More...
 
void add_features_segs (double(*)(std::vector< Point2 >, TTessel *))
 Add a segment feature in the energy formula. More...
 
void del_features_vertices ()
 Remove all vertex features from the energy formula.
 
void del_features_edges ()
 Remove all edge features from the energy formula.
 
void del_features_faces ()
 Remove all face features from the energy formula.
 
void del_features_segs ()
 Remove all segment features from the energy formula.
 

Detailed Description

Energy of a Gibbsian random T-tessellation.

The energy must have the following form:

\[ \sum_i \theta_i \phi_i(T) \]

where the $\theta_i$'s are real-valued parameters and the $\phi_i$'s are statistics of the type

\[ \phi_i(T) = \sum_x f_i(x) \]

where the sum runs over all vertices, or all edges, or all faces, or all segments of the T-tessellation.

Member Function Documentation

void Energy::add_features_edges ( double(*)(Segment, TTessel *)  fe)

Add an edge feature in the energy formula.

Parameters
fe: a pointer to a function that takes as input arguments an edge (as a line segment) and the T-tessellation. The function should return the contribution to the energy of the given edge.
void Energy::add_features_faces ( double(*)(Polygon, TTessel *)  ff)

Add a face feature in the energy formula.

Parameters
ff: a pointer to a function that takes as input arguments a face (as a polygon) and the T-tessellation. The function should return the contribution to the energy of the given face.
void Energy::add_features_segs ( double(*)(std::vector< Point2 >, TTessel *)  fs)

Add a segment feature in the energy formula.

Parameters
fs: a pointer to a function that takes as input arguments a segment and the T-tessellation. The function should return the contribution to the energy of the given segment.
void Energy::add_features_vertices ( double(*)(Point2, TTessel *)  fv)

Add a vertex feature in the energy formula.

Parameters
fv: a pointer to a function that takes as input arguments the vertex location and the T-tessellation. The function should return the contribution to the energy of the given vertex.
void Energy::add_theta_edges ( double  te)

Add a theta component for a edge feature in the energy formula.

/param te : the numerical value of the theta component to be added

void Energy::add_theta_faces ( double  tf)

Add a theta component for a face feature in the energy formula.

/param tv : the numerical value of the theta component to be added

void Energy::add_theta_segs ( double  ts)

Add a theta component for a segment feature in the energy formula.

/param ts : the numerical value of the theta component to be added

void Energy::add_theta_vertices ( double  tv)

Add a theta component for a vertex feature in the energy formula.

/param tv : the numerical value of the theta component to be added

void Energy::set_ttessel ( TTessel t)

Define the T-tessellation whose energy is to be monitored.

Associate the model with a T-tessellation

Current energy is computed from scratch.

CatVector Energy::statistic_variation ( TTessel::Modification modif)

Compute the statistic variation.

Compute the statistic variation for a given modification (either a split or merge or flip). The statistic is the vector of the the functions $\phi_i$'s. For a given modification $u$, variations

\[ \phi_i(uT)-\phi_i(T) \]

are computed. Since functions $\phi_i$'s are sums over basic tessellation components (vertices, edges etc...), variations can be computed from the lists of added and removed components under the modification $u$.

Parameters
modif: either a Split or Merge or Flip object
Returns
component-by-component statistic variation as a Parameter object
double Energy::variation ( TTessel::Modification modif)

Compute the energy variation.

If $u$ is the considered modification (either a split or merge or flip),

\[ \sum_i \theta_i (\phi_i(uT)-\phi_i(T)) \]

is returned.

Parameters
modif: either a Split or Merge or Flip object
Returns
the energy variation

The documentation for this class was generated from the following files: