Gudhi::Simplex_tree< SimplexTreeOptions > Class Template Reference

Simplex Tree data structure for representing simplicial complexes. More...

Public Types

typedef Options::Filtration_value Filtration_value
 Type for the value of the filtration function. More...
 
typedef Options::Simplex_key Simplex_key
 Key associated to each simplex. More...
 
typedef Options::Vertex_handle Vertex_handle
 Type for the vertex handle. More...
 
typedef Dictionary::iterator Simplex_handle
 Handle type to a simplex contained in the simplicial complex represented by the simplex tree.
 
Range and iterator types

The naming convention is Container_content_(iterator/range). A Container_content_range is essentially an object on which the methods begin() and end() can be called. They both return an object of type Container_content_iterator, and allow the traversal of the range [ begin();end() ).

typedef boost::transform_iterator< return_first, Dictionary_it > Complex_vertex_iterator
 Iterator over the vertices of the simplicial complex. More...
 
typedef boost::iterator_range< Complex_vertex_iteratorComplex_vertex_range
 Range over the vertices of the simplicial complex.
 
typedef Simplex_tree_simplex_vertex_iterator< Simplex_treeSimplex_vertex_iterator
 Iterator over the vertices of a simplex. More...
 
typedef boost::iterator_range< Simplex_vertex_iteratorSimplex_vertex_range
 Range over the vertices of a simplex.
 
typedef std::vector< Simplex_handleCofaces_simplex_range
 Range over the cofaces of a simplex.
 
typedef Simplex_tree_boundary_simplex_iterator< Simplex_treeBoundary_simplex_iterator
 Iterator over the simplices of the boundary of a simplex. More...
 
typedef boost::iterator_range< Boundary_simplex_iteratorBoundary_simplex_range
 Range over the simplices of the boundary of a simplex.
 
typedef Simplex_tree_complex_simplex_iterator< Simplex_treeComplex_simplex_iterator
 Iterator over the simplices of the simplicial complex. More...
 
typedef boost::iterator_range< Complex_simplex_iteratorComplex_simplex_range
 Range over the simplices of the simplicial complex.
 
typedef Simplex_tree_skeleton_simplex_iterator< Simplex_treeSkeleton_simplex_iterator
 Iterator over the simplices of the skeleton of the simplicial complex, for a given dimension. More...
 
typedef boost::iterator_range< Skeleton_simplex_iteratorSkeleton_simplex_range
 Range over the simplices of the skeleton of the simplicial complex, for a given dimension.
 
typedef std::vector< Simplex_handleFiltration_simplex_range
 Range over the simplices of the simplicial complex, ordered by the filtration.
 
typedef Filtration_simplex_range::const_iterator Filtration_simplex_iterator
 Iterator over the simplices of the simplicial complex, ordered by the filtration. More...
 

Public Member Functions

bool operator== (Simplex_tree &st2)
 Checks if two simplex trees are equal.
 
bool operator!= (Simplex_tree &st2)
 Checks if two simplex trees are different.
 
Simplex_handle simplex (Simplex_key key) const
 Returns the simplex associated to a key. More...
 
void assign_filtration (Simplex_handle sh, Filtration_value fv)
 Sets the filtration value of a simplex.

Exceptions
std::invalid_argumentIn debug mode, if sh is a null_simplex.

 
Filtration_value filtration () const
 Returns an upper bound of the filtration values of the simplices.
 
Vertex_handle null_vertex () const
 Returns a Vertex_handle different from all Vertex_handles associated to the vertices of the simplicial complex.
 
size_t num_vertices () const
 Returns the number of vertices in the complex.
 
size_t num_simplices ()
 returns the number of simplices in the simplex_tree.
 
int dimension (Simplex_handle sh)
 Returns the dimension of a simplex. More...
 
int dimension () const
 Returns an upper bound on the dimension of the simplicial complex.
 
template<class SimplexHandle >
bool has_children (SimplexHandle sh) const
 Returns true if the node in the simplex tree pointed by sh has children.
 
template<class InputVertexRange = std::initializer_list<Vertex_handle>>
Simplex_handle find (const InputVertexRange &s)
 Given a range of Vertex_handles, returns the Simplex_handle of the simplex in the simplicial complex containing the corresponding vertices. Return null_simplex() if the simplex is not in the complex. More...
 
template<class InputVertexRange = std::initializer_list<Vertex_handle>>
std::pair< Simplex_handle, bool > insert_simplex (const InputVertexRange &simplex, Filtration_value filtration=0)
 Insert a simplex, represented by a range of Vertex_handles, in the simplicial complex. More...
 
template<class InputVertexRange = std::initializer_list<Vertex_handle>>
std::pair< Simplex_handle, bool > insert_simplex_and_subfaces (const InputVertexRange &Nsimplex, Filtration_value filtration=0)
 Insert a N-simplex and all his subfaces, from a N-simplex represented by a range of Vertex_handles, in the simplicial complex. More...
 
void assign_key (Simplex_handle sh, Simplex_key key)
 Assign a value 'key' to the key of the simplex represented by the Simplex_handle 'sh'.
 
std::pair< Simplex_handle, Simplex_handleendpoints (Simplex_handle sh)
 
template<class SimplexHandle >
Siblings * self_siblings (SimplexHandle sh)
 
Siblings * root ()
 
void set_filtration (Filtration_value fil)
 
void set_dimension (int dimension)
 
void initialize_filtration ()
 Initializes the filtrations, i.e. sort the simplices according to their order in the filtration and initializes all Simplex_keys. More...
 
Cofaces_simplex_range star_simplex_range (const Simplex_handle simplex)
 Compute the star of a n simplex. More...
 
Cofaces_simplex_range cofaces_simplex_range (const Simplex_handle simplex, int codimension)
 Compute the cofaces of a n simplex. More...
 
template<class OneSkeletonGraph >
void insert_graph (const OneSkeletonGraph &skel_graph)
 Inserts a 1-skeleton in an empty Simplex_tree. More...
 
void expansion (int max_dim)
 Expands the Simplex_tree containing only its one skeleton until dimension max_dim. More...
 
void print_hasse (std::ostream &os)
 Write the hasse diagram of the simplicial complex in os. More...
 
bool make_filtration_non_decreasing ()
 Browse the simplex tree to ensure the filtration is not decreasing. The simplex tree is browsed starting from the root until the leaf, and the filtration values are set with their parent value (increased), in case the values are decreasing. More...
 
bool prune_above_filtration (Filtration_value filtration)
 Prune above filtration value given as parameter. More...
 
void remove_maximal_simplex (Simplex_handle sh)
 Remove a maximal simplex. More...
 
Range and iterator methods
Complex_vertex_range complex_vertex_range ()
 Returns a range over the vertices of the simplicial complex. The order is increasing according to < on Vertex_handles.
 
Complex_simplex_range complex_simplex_range ()
 Returns a range over the simplices of the simplicial complex. More...
 
Skeleton_simplex_range skeleton_simplex_range (int dim)
 Returns a range over the simplices of the dim-skeleton of the simplicial complex. More...
 
Filtration_simplex_range const & filtration_simplex_range (Indexing_tag=Indexing_tag())
 Returns a range over the simplices of the simplicial complex, in the order of the filtration. More...
 
Simplex_vertex_range simplex_vertex_range (Simplex_handle sh)
 Returns a range over the vertices of a simplex. More...
 
template<class SimplexHandle >
Boundary_simplex_range boundary_simplex_range (SimplexHandle sh)
 Returns a range over the simplices of the boundary of a simplex. More...
 
Constructor/Destructor
 Simplex_tree ()
 Constructs an empty simplex tree.
 
 Simplex_tree (const Simplex_tree &simplex_source)
 User-defined copy constructor reproduces the whole tree structure.
 
void rec_copy (Siblings *sib, Siblings *sib_source)
 depth first search, inserts simplices when reaching a leaf.
 
 Simplex_tree (Simplex_tree &&old)
 User-defined move constructor moves the whole tree structure.
 
 ~Simplex_tree ()
 Destructor; deallocates the whole tree structure.
 

Static Public Member Functions

static Simplex_key key (Simplex_handle sh)
 Returns the key associated to a simplex. More...
 
static Filtration_value filtration (Simplex_handle sh)
 Returns the filtration value of a simplex. More...
 
static Simplex_handle null_simplex ()
 Returns a Simplex_handle different from all Simplex_handles associated to the simplices in the simplicial complex. More...
 
static Simplex_key null_key ()
 Returns a key different for all keys associated to the simplices of the simplicial complex.
 

Detailed Description

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
class Gudhi::Simplex_tree< SimplexTreeOptions >

Simplex Tree data structure for representing simplicial complexes.

Every simplex $[v_0, \cdots ,v_d]$ admits a canonical orientation induced by the order relation on vertices $ v_0 < \cdots < v_d $.

Details may be found in [5].

Examples:
Alpha_complex/Alpha_complex_from_off.cpp, Alpha_complex/Alpha_complex_from_points.cpp, Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp, Persistent_cohomology/alpha_complex_3d_persistence.cpp, Persistent_cohomology/alpha_complex_persistence.cpp, Persistent_cohomology/custom_persistence_sort.cpp, Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp, Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp, Persistent_cohomology/persistence_from_file.cpp, Persistent_cohomology/persistence_from_simple_simplex_tree.cpp, Persistent_cohomology/plain_homology.cpp, Persistent_cohomology/rips_distance_matrix_persistence.cpp, Persistent_cohomology/rips_multifield_persistence.cpp, Persistent_cohomology/rips_persistence.cpp, Persistent_cohomology/rips_persistence_step_by_step.cpp, Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp, Persistent_cohomology/weighted_alpha_complex_3d_persistence.cpp, Rips_complex/example_one_skeleton_rips_from_points.cpp, Rips_complex/example_rips_complex_from_off_file.cpp, Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp, Simplex_tree/mini_simplex_tree.cpp, Simplex_tree/simple_simplex_tree.cpp, Simplex_tree/simplex_tree_from_cliques_of_graph.cpp, Tangential_complex/example_basic.cpp, Tangential_complex/example_with_perturb.cpp, Witness_complex/example_nearest_landmark_table.cpp, Witness_complex/example_strong_witness_complex_off.cpp, Witness_complex/example_strong_witness_persistence.cpp, Witness_complex/example_witness_complex_off.cpp, Witness_complex/example_witness_complex_persistence.cpp, and Witness_complex/example_witness_complex_sphere.cpp.

Member Typedef Documentation

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
typedef Simplex_tree_boundary_simplex_iterator<Simplex_tree> Gudhi::Simplex_tree< SimplexTreeOptions >::Boundary_simplex_iterator

Iterator over the simplices of the boundary of a simplex.

'value_type' is Simplex_handle.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
typedef Simplex_tree_complex_simplex_iterator<Simplex_tree> Gudhi::Simplex_tree< SimplexTreeOptions >::Complex_simplex_iterator

Iterator over the simplices of the simplicial complex.

'value_type' is Simplex_handle.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
typedef boost::transform_iterator<return_first, Dictionary_it> Gudhi::Simplex_tree< SimplexTreeOptions >::Complex_vertex_iterator

Iterator over the vertices of the simplicial complex.

'value_type' is Vertex_handle.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
typedef Filtration_simplex_range::const_iterator Gudhi::Simplex_tree< SimplexTreeOptions >::Filtration_simplex_iterator

Iterator over the simplices of the simplicial complex, ordered by the filtration.

'value_type' is Simplex_handle.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
typedef Options::Filtration_value Gudhi::Simplex_tree< SimplexTreeOptions >::Filtration_value

Type for the value of the filtration function.

Must be comparable with <.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
typedef Options::Simplex_key Gudhi::Simplex_tree< SimplexTreeOptions >::Simplex_key

Key associated to each simplex.

Must be an integer type.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
typedef Simplex_tree_simplex_vertex_iterator<Simplex_tree> Gudhi::Simplex_tree< SimplexTreeOptions >::Simplex_vertex_iterator

Iterator over the vertices of a simplex.

'value_type' is Vertex_handle.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
typedef Simplex_tree_skeleton_simplex_iterator<Simplex_tree> Gudhi::Simplex_tree< SimplexTreeOptions >::Skeleton_simplex_iterator

Iterator over the simplices of the skeleton of the simplicial complex, for a given dimension.

'value_type' is Simplex_handle.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
typedef Options::Vertex_handle Gudhi::Simplex_tree< SimplexTreeOptions >::Vertex_handle

Type for the vertex handle.

Must be a signed integer type. It admits a total order <.

Member Function Documentation

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
template<class SimplexHandle >
Boundary_simplex_range Gudhi::Simplex_tree< SimplexTreeOptions >::boundary_simplex_range ( SimplexHandle  sh)
inline

Returns a range over the simplices of the boundary of a simplex.

The boundary of a simplex is the set of codimension $1$ subsimplices of the simplex. If the simplex is $[v_0, \cdots ,v_d]$, with canonical orientation induced by $ v_0 < \cdots < v_d $, the iterator enumerates the simplices of the boundary in the order: $[v_0,\cdots,\widehat{v_i},\cdots,v_d]$ for $i$ from $0$ to $d$, where $\widehat{v_i}$ means that the vertex $v_i$ is omitted.

We note that the alternate sum of the simplices given by the iterator gives $(-1)^{\text{dim} \sigma}$ the chains corresponding to the boundary of the simplex.

Parameters
[in]shSimplex for which the boundary is computed.
template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
Cofaces_simplex_range Gudhi::Simplex_tree< SimplexTreeOptions >::cofaces_simplex_range ( const Simplex_handle  simplex,
int  codimension 
)
inline

Compute the cofaces of a n simplex.

Parameters
simplexrepresent the n-simplex of which we search the n+codimension cofaces
codimensionThe function returns the n+codimension-cofaces of the n-simplex. If codimension = 0, return all cofaces (equivalent of star function)
Returns
Vector of Simplex_handle, empty vector if no cofaces found.
template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
Complex_simplex_range Gudhi::Simplex_tree< SimplexTreeOptions >::complex_simplex_range ( )
inline

Returns a range over the simplices of the simplicial complex.

In the Simplex_tree, the tree is traverse in a depth-first fashion. Consequently, simplices are ordered according to lexicographic order on the list of Vertex_handles of a simplex, read in increasing < order for Vertex_handles.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
int Gudhi::Simplex_tree< SimplexTreeOptions >::dimension ( Simplex_handle  sh)
inline

Returns the dimension of a simplex.

Must be different from null_simplex().

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
std::pair<Simplex_handle, Simplex_handle> Gudhi::Simplex_tree< SimplexTreeOptions >::endpoints ( Simplex_handle  sh)
inline

Returns the two Simplex_handle corresponding to the endpoints of and edge. sh must point to a 1-dimensional simplex. This is an optimized version of the boundary computation.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
void Gudhi::Simplex_tree< SimplexTreeOptions >::expansion ( int  max_dim)
inline

Expands the Simplex_tree containing only its one skeleton until dimension max_dim.

The expanded simplicial complex until dimension $d$ attached to a graph $G$ is the maximal simplicial complex of dimension at most $d$ admitting the graph $G$ as $1$-skeleton. The filtration value assigned to a simplex is the maximal filtration value of one of its edges.

The Simplex_tree must contain no simplex of dimension bigger than 1 when calling the method.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
static Filtration_value Gudhi::Simplex_tree< SimplexTreeOptions >::filtration ( Simplex_handle  sh)
inlinestatic

Returns the filtration value of a simplex.

Called on the null_simplex, returns INFINITY. If SimplexTreeOptions::store_filtration is false, returns 0.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
Filtration_simplex_range const& Gudhi::Simplex_tree< SimplexTreeOptions >::filtration_simplex_range ( Indexing_tag  = Indexing_tag())
inline

Returns a range over the simplices of the simplicial complex, in the order of the filtration.

The filtration is a monotonic function $ f: \mathbf{K} \rightarrow \mathbb{R} $, i.e. if two simplices $\tau$ and $\sigma$ satisfy $\tau \subseteq \sigma$ then $f(\tau) \leq f(\sigma)$.

The method returns simplices ordered according to increasing filtration values. Ties are resolved by considering inclusion relation (subsimplices appear before their cofaces). If two simplices have same filtration value but are not comparable w.r.t. inclusion, lexicographic order is used.

The filtration must be valid. If the filtration has not been initialized yet, the method initializes it (i.e. order the simplices). If the complex has changed since the last time the filtration was initialized, please call initialize_filtration() to recompute it.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
template<class InputVertexRange = std::initializer_list<Vertex_handle>>
Simplex_handle Gudhi::Simplex_tree< SimplexTreeOptions >::find ( const InputVertexRange &  s)
inline

Given a range of Vertex_handles, returns the Simplex_handle of the simplex in the simplicial complex containing the corresponding vertices. Return null_simplex() if the simplex is not in the complex.

The type InputVertexRange must be a range of Vertex_handle on which we can call std::begin() function

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
void Gudhi::Simplex_tree< SimplexTreeOptions >::initialize_filtration ( )
inline

Initializes the filtrations, i.e. sort the simplices according to their order in the filtration and initializes all Simplex_keys.

After calling this method, filtration_simplex_range() becomes valid, and each simplex is assigned a Simplex_key corresponding to its order in the filtration (from 0 to m-1 for a simplicial complex with m simplices).

Will be automatically called when calling filtration_simplex_range() if the filtration has never been initialized yet.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
template<class OneSkeletonGraph >
void Gudhi::Simplex_tree< SimplexTreeOptions >::insert_graph ( const OneSkeletonGraph &  skel_graph)
inline

Inserts a 1-skeleton in an empty Simplex_tree.

The Simplex_tree must contain no simplex when the method is called.

Inserts all vertices and edges given by a OneSkeletonGraph. OneSkeletonGraph must be a model of boost::AdjacencyGraph, boost::EdgeListGraph and boost::PropertyGraph.

The vertex filtration value is accessible through the property tag vertex_filtration_t. The edge filtration value is accessible through the property tag edge_filtration_t.

boost::graph_traits<OneSkeletonGraph>::vertex_descriptor must be Vertex_handle. boost::graph_traits<OneSkeletonGraph>::directed_category must be undirected_tag.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
template<class InputVertexRange = std::initializer_list<Vertex_handle>>
std::pair<Simplex_handle, bool> Gudhi::Simplex_tree< SimplexTreeOptions >::insert_simplex ( const InputVertexRange &  simplex,
Filtration_value  filtration = 0 
)
inline

Insert a simplex, represented by a range of Vertex_handles, in the simplicial complex.

Parameters
[in]simplexrange of Vertex_handles, representing the vertices of the new simplex
[in]filtrationthe filtration value assigned to the new simplex.
Returns
If the new simplex is inserted successfully (i.e. it was not in the simplicial complex yet) the bool is set to true and the Simplex_handle is the handle assigned to the new simplex. If the insertion fails (the simplex is already there), the bool is set to false. If the insertion fails and the simplex already in the complex has a filtration value strictly bigger than 'filtration', we assign this simplex with the new value 'filtration', and set the Simplex_handle field of the output pair to the Simplex_handle of the simplex. Otherwise, we set the Simplex_handle part to null_simplex.

All subsimplices do not necessary need to be already in the simplex tree to proceed to an insertion. However, the property of being a simplicial complex will be violated. This allows us to insert a stream of simplices contained in a simplicial complex without considering any order on them.

The filtration value assigned to the new simplex must preserve the monotonicity of the filtration.

The type InputVertexRange must be a range for which .begin() and .end() return input iterators, with 'value_type' Vertex_handle.

Examples:
Simplex_tree/simple_simplex_tree.cpp.
template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
template<class InputVertexRange = std::initializer_list<Vertex_handle>>
std::pair<Simplex_handle, bool> Gudhi::Simplex_tree< SimplexTreeOptions >::insert_simplex_and_subfaces ( const InputVertexRange &  Nsimplex,
Filtration_value  filtration = 0 
)
inline

Insert a N-simplex and all his subfaces, from a N-simplex represented by a range of Vertex_handles, in the simplicial complex.

Parameters
[in]Nsimplexrange of Vertex_handles, representing the vertices of the new N-simplex
[in]filtrationthe filtration value assigned to the new N-simplex.
Returns
If the new simplex is inserted successfully (i.e. it was not in the simplicial complex yet) the bool is set to true and the Simplex_handle is the handle assigned to the new simplex. If the insertion fails (the simplex is already there), the bool is set to false. If the insertion fails and the simplex already in the complex has a filtration value strictly bigger than 'filtration', we assign this simplex with the new value 'filtration', and set the Simplex_handle field of the output pair to the Simplex_handle of the simplex. Otherwise, we set the Simplex_handle part to null_simplex.
template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
static Simplex_key Gudhi::Simplex_tree< SimplexTreeOptions >::key ( Simplex_handle  sh)
inlinestatic

Returns the key associated to a simplex.

The filtration must be initialized.

Precondition
SimplexTreeOptions::store_key
template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
bool Gudhi::Simplex_tree< SimplexTreeOptions >::make_filtration_non_decreasing ( )
inline

Browse the simplex tree to ensure the filtration is not decreasing. The simplex tree is browsed starting from the root until the leaf, and the filtration values are set with their parent value (increased), in case the values are decreasing.

Returns
The filtration modification information.
Postcondition
Some simplex tree functions require the filtration to be valid. make_filtration_non_decreasing() function is not launching initialize_filtration() but returns the filtration modification information. If the complex has changed , please call initialize_filtration() to recompute it.
template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
static Simplex_handle Gudhi::Simplex_tree< SimplexTreeOptions >::null_simplex ( )
inlinestatic

Returns a Simplex_handle different from all Simplex_handles associated to the simplices in the simplicial complex.

One can call filtration(null_simplex()).

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
void Gudhi::Simplex_tree< SimplexTreeOptions >::print_hasse ( std::ostream &  os)
inline

Write the hasse diagram of the simplicial complex in os.

Each row in the file correspond to a simplex. A line is written: dim idx_1 ... idx_k fil where dim is the dimension of the simplex, idx_1 ... idx_k are the row index (starting from 0) of the simplices of the boundary of the simplex, and fil is its filtration value.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
bool Gudhi::Simplex_tree< SimplexTreeOptions >::prune_above_filtration ( Filtration_value  filtration)
inline

Prune above filtration value given as parameter.

Parameters
[in]filtrationMaximum threshold value.
Returns
The filtration modification information.
Postcondition
Some simplex tree functions require the filtration to be valid. prune_above_filtration() function is not launching initialize_filtration() but returns the filtration modification information. If the complex has changed , please call initialize_filtration() to recompute it.
template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
void Gudhi::Simplex_tree< SimplexTreeOptions >::remove_maximal_simplex ( Simplex_handle  sh)
inline

Remove a maximal simplex.

Parameters
[in]shSimplex handle on the maximal simplex to remove.
Precondition
Please check the simplex has no coface before removing it.
Exceptions
std::invalid_argumentIn debug mode, if sh has children.
Postcondition
Be aware that removing is shifting data in a flat_map (initialize_filtration to be done).
template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
Siblings* Gudhi::Simplex_tree< SimplexTreeOptions >::root ( )
inline

Returns a pointer to the root nodes of the simplex tree.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
template<class SimplexHandle >
Siblings* Gudhi::Simplex_tree< SimplexTreeOptions >::self_siblings ( SimplexHandle  sh)
inline

Returns the Siblings containing a simplex.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
void Gudhi::Simplex_tree< SimplexTreeOptions >::set_dimension ( int  dimension)
inline

Set a dimension for the simplicial complex.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
void Gudhi::Simplex_tree< SimplexTreeOptions >::set_filtration ( Filtration_value  fil)
inline

Set an upper bound for the filtration values.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
Simplex_handle Gudhi::Simplex_tree< SimplexTreeOptions >::simplex ( Simplex_key  key) const
inline

Returns the simplex associated to a key.

The filtration must be initialized.

Precondition
SimplexTreeOptions::store_key
template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
Simplex_vertex_range Gudhi::Simplex_tree< SimplexTreeOptions >::simplex_vertex_range ( Simplex_handle  sh)
inline

Returns a range over the vertices of a simplex.

The order in which the vertices are visited is the decreasing order for < on Vertex_handles, which is consequenlty equal to $(-1)^{\text{dim} \sigma}$ the canonical orientation on the simplex.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
Skeleton_simplex_range Gudhi::Simplex_tree< SimplexTreeOptions >::skeleton_simplex_range ( int  dim)
inline

Returns a range over the simplices of the dim-skeleton of the simplicial complex.

The $d$-skeleton of a simplicial complex $\mathbf{K}$ is the simplicial complex containing the simplices of $\mathbf{K}$ of dimension at most $d$.

Parameters
[in]dimThe maximal dimension of the simplices in the skeleton.

The simplices are ordered according to lexicographic order on the list of Vertex_handles of a simplex, read in increasing < order for Vertex_handles.

template<typename SimplexTreeOptions = Simplex_tree_options_full_featured>
Cofaces_simplex_range Gudhi::Simplex_tree< SimplexTreeOptions >::star_simplex_range ( const Simplex_handle  simplex)
inline

Compute the star of a n simplex.

Parameters
simplexrepresent the simplex of which we search the star
Returns
Vector of Simplex_handle, empty vector if no cofaces found.

The documentation for this class was generated from the following file:
GUDHI  Version 2.0.0  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding. Generated on Wed Apr 19 2017 22:26:16 for GUDHI by doxygen 1.8.11