Energy of a Gibbsian random T-tessellation. More...
#include <ttessel.h>
Public Member Functions | |
TTessel * | get_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. | |
Energy of a Gibbsian random T-tessellation.
The energy must have the following form:
where the 's are real-valued parameters and the 's are statistics of the type
where the sum runs over all vertices, or all edges, or all faces, or all segments of the T-tessellation.
Add an edge feature in the energy formula.
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. |
Add a face feature in the energy formula.
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. |
Add a segment feature in the energy formula.
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. |
Add a vertex feature in the energy formula.
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 's. For a given modification , variations
are computed. Since functions '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 .
modif | : either a Split or Merge or Flip object |
double Energy::variation | ( | TTessel::Modification & | modif | ) |
Compute the energy variation.
If is the considered modification (either a split or merge or flip),
is returned.
modif | : either a Split or Merge or Flip object |