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

Dynamic T-tessellation. More...

#include <ttessel.h>

Inheritance diagram for TTessel:
LineTes

Classes

class  Flip
 A flip that can be applied to a T-tessellation. More...
 
class  Merge
 A merge that can be applied to a T-tessellation. More...
 
class  Modification
 Abstract class representing a modification of a T-tessellation. More...
 
class  Split
 A split that can be applied to a T-tessellation. More...
 

Public Types

typedef std::vector< SplitSplit_list
 A list of splits.
 
typedef std::vector< MergeMerge_list
 A list of merges.
 
typedef std::vector< FlipFlip_list
 A list of flips.
 
typedef Split_list::iterator Split_list_iterator
 Iterator for accessing splits in a list.
 
typedef Merge_list::iterator Merge_list_iterator
 Iterator for accessing merges in a list.
 
typedef Flip_list::iterator Flip_list_iterator
 Iterator for accessing flips in a list.
 
- Public Types inherited from LineTes
typedef SegSeg_handle
 Pointer to a Seg object.
 
typedef Seg_list::iterator Seg_list_iterator
 Iterator for accessing segments in a list.
 
typedef Seg_sublist::iterator Seg_sublist_iterator
 Iterator for accessing segments in a sublist of segments.
 

Public Member Functions

 TTessel ()
 Empty constructor. More...
 
 TTessel (LineTes &)
 Generate a TTessel object from a LineTes Object. More...
 
virtual void insert_window (Rectangle)
 Define the rectangular domain to be tessellated.
 
virtual void insert_window (Polygon &)
 Define the polygonal domain to be tessellated. More...
 
Halfedge_handle update (Split)
 Split a T-tessellation. More...
 
Face_handle update (Merge)
 Merge a T-tessellation. More...
 
Halfedge_handle update (Flip)
 Flip a T-tessellation. More...
 
void clear ()
 Empty the T-tessellation.
 
bool is_valid (bool verbose=false)
 Check validity of a T-tessellation param verbose : if true, details are sent to std::clog. Default to false. More...
 
Split propose_split ()
 Propose a split applicable to the T-tessellation.
 
Merge propose_merge ()
 Propose a merge applicable to the T-tessellation.
 
Flip propose_flip ()
 Propose a flip applicable to the T-tessellation.
 
Split_list split_sample (Size)
 Return a random sample of splits. More...
 
Split_list poisson_splits (double)
 Return a Poisson sample of splits. More...
 
Merge_list all_merges ()
 Return all possible merges. More...
 
Flip_list all_flips ()
 Return all possible flips. More...
 
Size number_of_blocking_segments ()
 Return the number of internal blocking segments.
 
Size number_of_non_blocking_segments ()
 Return the number of internal non-blocking segments.
 
Seg_sublist_iterator blocking_segments_begin ()
 Return an iterator pointing to the first internal blocking segment.
 
Seg_sublist_iterator blocking_segments_end ()
 Return an iterator pointing to the past-the-end internal blocking segment.
 
Seg_sublist_iterator non_blocking_segments_begin ()
 Return an iterator pointing to the first internal non-blocking segment.
 
Seg_sublist_iterator non_blocking_segments_end ()
 Return an iterator pointing to the past-the-end internal non-blocking segment.
 
double get_total_internal_length ()
 Sum of all halfedge lengths. More...
 
Polygons all_faces ()
 Return all faces of the tessellation as polygons.
 
void print_blocking_segments ()
 Print on standard output all blocking segments. More...
 
void print_non_blocking_segments ()
 Print on standard output all non-blocking segments. More...
 
void printRCALI (std::ostream &)
 Print the tessellation in a format supported by califlopp. More...
 
- Public Member Functions inherited from LineTes
 LineTes ()
 Empty LineTes constructor. More...
 
Halfedge_handle split_from_edge (Halfedge_handle, Point2, Halfedge_handle, Point2)
 Split a tessellation cell from an edge to another one. More...
 
Halfedge_handle split_from_vertex (Vertex_handle, Halfedge_handle, Point2)
 Split a tessellation cell from a vertex to an edge. More...
 
Face_handle suppress_edge (Halfedge_handle)
 Suppress an edge from the tessellation. More...
 
void clear ()
 Clear a tessellation. More...
 
Seg_list_iterator segments_begin ()
 Return an iterator pointing to the beginning of the list of tessellation segments.
 
Seg_list_iterator segments_end ()
 Return an iterator pointing to the end of the list of tessellation segments.
 
Size number_of_segments ()
 Return the total number of segments. More...
 
bool is_valid (bool verbose=false)
 Check whether the LineTes object is valid. More...
 
bool check_all_segments (bool verbose=false)
 Test whether all segments of a tessellation are valid. More...
 
bool check_segment (Seg_handle s, bool verbose=false)
 Test whether a segment of a tessellation is valid. More...
 
bool check_all_halfedges (bool verbose=false)
 Check all halfedges of a line tessellation. More...
 
bool check_halfedge (LineTes::Halfedge_handle e, bool verbose=false)
 Test whether a halfedge is valid. More...
 
bool halfedge_exists (LineTes::Halfedge_handle)
 Test whether a halfedge handle is indeed a halfedge handle of a tessellation.
 
bool check_halfedge_neighbours (LineTes::Halfedge_handle e, bool verbose=false)
 Check the neighbours of a halfedge along its segment. More...
 
bool check_halfedge_prev_hf (LineTes::Halfedge_handle e, bool verbose=false)
 Check the previous neighbour of a halfedge along its segment. More...
 
bool check_halfedge_next_hf (LineTes::Halfedge_handle e, bool verbose=false)
 Check the next neighbour of a halfedge along its segment. More...
 
bool check_halfedge_segment (LineTes::Halfedge_handle e, bool verbose=false)
 Check the segment attribute of a halfedge. More...
 
bool check_halfedge_dir (LineTes::Halfedge_handle e, bool verbose=false)
 Check the direction attribute of a halfedge. More...
 
void print_all_segments (bool endsOnly=false)
 Print on standard output the segment points. More...
 
Polygon get_window ()
 Return the domain that is tessellated.
 
Size number_of_window_edges ()
 Return the number of sides of the tessellated domain.
 
double get_window_perimeter ()
 Return the perimeter of the tessellated domain.
 
int is_on_boundary (Halfedge_handle)
 Test whether a halfedge lies along the domain boundary. More...
 
bool is_on_boundary (Seg_handle s)
 Test whether a segment lies on the domain boundary. More...
 
Seg_handle insert_segment (Segment)
 Insert a new line segment in a line tessellation. More...
 
void remove_ivertices (Size imax=0, bool verbose=false)
 Remove all I-vertices from a line tessellation. More...
 
void remove_lvertices (Size imax=0, bool verbose=false)
 Remove all L-vertices from a line tessellation. More...
 
bool is_a_T_tessellation (bool verbose=false, std::ostream &out=std::clog)
 Test whether a line tessellation is a T-tessellation. More...
 
void write (std::ostream &)
 Write a LineTes object to an output stream. More...
 
void read (std::istream &)
 Read a LineTes object from an input stream. More...
 

Detailed Description

Dynamic T-tessellation.

Possible updates are splits, merges and flips.

Constructor & Destructor Documentation

TTessel::TTessel ( )

Empty constructor.

Invoke the empty constructor of the parent class LineTes.

TTessel::TTessel ( LineTes lt)

Generate a TTessel object from a LineTes Object.

Parameters
lt: the LineTes object to copy

The LineTes object should be a valid T-tessellation.

Member Function Documentation

TTessel::Flip_list TTessel::all_flips ( )

Return all possible flips.

Returns
a list of Flip objects
TTessel::Merge_list TTessel::all_merges ( )

Return all possible merges.

Returns
a list of Merge objects
double TTessel::get_total_internal_length ( )
inline

Sum of all halfedge lengths.

The sum of halfedge lengths is equal to the sum of cell perimeters.

void TTessel::insert_window ( Polygon p)
virtual

Define the polygonal domain to be tessellated.

Do not use this method at the moment as non-rectangular domains are not fully supported by the LineTes class.

Reimplemented from LineTes.

bool TTessel::is_valid ( bool  verbose = false)

Check validity of a T-tessellation param verbose : if true, details are sent to std::clog. Default to false.

Returns
true if valid, false otherwise.

The following checks are performed:

  • Validity as a LineTes object.
  • All internal vertices are T-vertices.
  • All non-blocking segments consist of one edge only.
  • All blocking segments consist of two edges at least.
TTessel::Split_list TTessel::poisson_splits ( double  intensity)

Return a Poisson sample of splits.

The Poissonnian process of splits has an intensity measure proportional to the uniform measure on the space of splits.

Parameters
intensity: intensity of the Poissonnian process as a double.
Returns
a list of Split objects
void TTessel::print_blocking_segments ( )

Print on standard output all blocking segments.

Segments are printed using the LineTes::Seg::print method. Coordinates of all vertices along each segment are printed.

void TTessel::print_non_blocking_segments ( )

Print on standard output all non-blocking segments.

Segments are printed using the LineTes::Seg::print method. Coordinates of all vertices along each segment are printed.

void TTessel::printRCALI ( std::ostream &  out)

Print the tessellation in a format supported by califlopp.

Parameters
out: ouput stream
TTessel::Split_list TTessel::split_sample ( Size  n)

Return a random sample of splits.

Parameters
n: sample size
Returns
a list of Split objects
TTessel::Halfedge_handle TTessel::update ( Split  spl)

Split a T-tessellation.

A cell of the current tessellation is split by a new edge.

TTessel::Face_handle TTessel::update ( Merge  me)

Merge a T-tessellation.

Two cells separated by a non-blocking segment are merged by the deletion of that segment.

TTessel::Halfedge_handle TTessel::update ( Flip  flip)

Flip a T-tessellation.

A segment is shortened and the segment blocked by the former is lengthened (???).


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