Gudhi Namespace Reference

Gudhi namespace. More...

Namespaces

 persistence_fields
 Field namespace.
 
 persistence_matrix
 Persistence matrix namespace.
 

Classes

class  Euclidean_distance
 Compute the Euclidean distance between two Points given by a range of coordinates. The points are assumed to have the same dimension. More...
 
class  Lazy_toplex_map
 Lazy toplex map data structure for representing unfiltered simplicial complexes. More...
 
struct  Null_output_iterator
 
class  Off_reader
 OFF file reader top class visitor. More...
 
class  Points_3D_off_visitor_reader
 OFF file visitor implementation according to Off_reader in order to read points from an OFF file. More...
 
class  Points_3D_off_reader
 
class  Points_off_visitor_reader
 OFF file visitor implementation according to Off_reader in order to read points from an OFF file. More...
 
class  Points_off_reader
 OFF file reader implementation in order to read points from an OFF file. More...
 
struct  Hooks_simplex_base_dummy
 No hook when SimplexTreeOptions::link_nodes_by_label is false. More...
 
struct  Hooks_simplex_base_link_nodes
 Data structure to put all simplex tree nodes with same label into a list. More...
 
struct  linear_indexing_tag
 Tag for a linear ordering of simplices. More...
 
class  Simplex_tree_simplex_vertex_iterator
 Iterator over the vertices of a simplex in a SimplexTree. More...
 
class  Simplex_tree_boundary_simplex_iterator
 Iterator over the simplices of the boundary of a simplex. More...
 
class  Simplex_tree_boundary_opposite_vertex_simplex_iterator
 Iterator over the simplices of the boundary of a simplex and their opposite vertices. More...
 
class  Simplex_tree_complex_simplex_iterator
 Iterator over the simplices of a simplicial complex. More...
 
class  Simplex_tree_skeleton_simplex_iterator
 Iterator over the simplices of the skeleton of a given dimension of the simplicial complex. More...
 
struct  Simplex_tree_node_explicit_storage
 Node of a simplex tree with filtration value and simplex key. More...
 
struct  Simplex_tree_options_default
 
struct  Simplex_tree_options_full_featured
 
struct  Simplex_tree_options_minimal
 
class  Simplex_tree_siblings
 Data structure to store a set of nodes in a SimplexTree sharing the same parent node. More...
 
class  Simplex_tree_optimized_star_simplex_iterator
 Iterator over the simplices of the star of a simplex. More...
 
class  Simplex_tree
 Simplex Tree data structure for representing simplicial complexes. More...
 
class  Toplex_map
 Toplex map data structure for representing unfiltered simplicial complexes. More...
 
class  Persistence_interval_common
 

Typedefs

template<typename SimplicialComplexForProximityGraph >
using Proximity_graph = typename boost::adjacency_list< boost::vecS, boost::vecS, boost::directedS, boost::property< vertex_filtration_t, typename SimplicialComplexForProximityGraph::Filtration_value >, boost::property< edge_filtration_t, typename SimplicialComplexForProximityGraph::Filtration_value > >
 Proximity_graph contains the vertices and edges with their filtration values in order to store the result of Gudhi::compute_proximity_graph function. More...
 

Functions

template<typename SimplicialComplexForProximityGraph , typename ForwardPointRange , typename Distance >
Proximity_graph< SimplicialComplexForProximityGraph > compute_proximity_graph (const ForwardPointRange &points, typename SimplicialComplexForProximityGraph::Filtration_value threshold, Distance distance)
 Computes the proximity graph of the points. More...
 
void read_points (std::string file_name, std::vector< std::vector< double >> &points)
 Read a set of points to turn it into a vector< vector<double> > by filling points. More...
 
template<typename Graph_t , typename Filtration_value , typename Vertex_handle >
Graph_t read_graph (std::string file_name)
 Read a graph from a file. More...
 
template<typename Vertex_handle , typename Filtration_value >
bool read_simplex (std::istream &in_, std::vector< Vertex_handle > &simplex, Filtration_value &fil)
 Read a face from a file. More...
 
template<typename Simplex_key , typename Filtration_value >
bool read_hasse_simplex (std::istream &in_, std::vector< Simplex_key > &boundary, Filtration_value &fil)
 Read a hasse simplex from a file. More...
 
template<typename Filtration_value >
std::vector< std::vector< Filtration_value > > read_lower_triangular_matrix_from_csv_file (const std::string &filename, const char separator=';')
 Read a lower triangular distance matrix from a csv file. We assume that the .csv store the whole (square) matrix. More...
 
template<typename OutputIterator >
void read_persistence_intervals_and_dimension (std::string const &filename, OutputIterator out)
 
std::map< int, std::vector< std::pair< double, double > > > read_persistence_intervals_grouped_by_dimension (std::string const &filename)
 
std::vector< std::pair< double, double > > read_persistence_intervals_in_dimension (std::string const &filename, int only_this_dim=-1)
 
template<typename Persistence_interval_range >
void write_persistence_intervals_to_stream (const Persistence_interval_range &intervals, std::ostream &out=std::cout)
 

Detailed Description

Gudhi namespace.

Typedef Documentation

◆ Proximity_graph

template<typename SimplicialComplexForProximityGraph >
using Gudhi::Proximity_graph = typedef typename boost::adjacency_list < boost::vecS, boost::vecS, boost::directedS , boost::property < vertex_filtration_t, typename SimplicialComplexForProximityGraph::Filtration_value > , boost::property < edge_filtration_t, typename SimplicialComplexForProximityGraph::Filtration_value > >

Proximity_graph contains the vertices and edges with their filtration values in order to store the result of Gudhi::compute_proximity_graph function.

Template Parameters
SimplicialComplexForProximityGraphfurnishes Filtration_value type definition.

Function Documentation

◆ compute_proximity_graph()

template<typename SimplicialComplexForProximityGraph , typename ForwardPointRange , typename Distance >
Proximity_graph<SimplicialComplexForProximityGraph> Gudhi::compute_proximity_graph ( const ForwardPointRange &  points,
typename SimplicialComplexForProximityGraph::Filtration_value  threshold,
Distance  distance 
)

Computes the proximity graph of the points.

If points contains n elements, the proximity graph is the graph with n vertices, and an edge [u,v] iff the distance function between points u and v is smaller than threshold.

Template Parameters
SimplicialComplexForProximityGraphfurnishes Filtration_value and Vertex_handle type definitions.
ForwardPointRangefurnishes .begin() and .end() methods.
Distancefurnishes operator()(const Point& p1, const Point& p2), where Point is a point from the ForwardPointRange, and that returns a Filtration_value.
Examples
cech_complex_cgal_mini_sphere_3d.cpp.

◆ read_graph()

template<typename Graph_t , typename Filtration_value , typename Vertex_handle >
Graph_t Gudhi::read_graph ( std::string  file_name)

Read a graph from a file.

Template Parameters
Graph_tType for the return graph. Must be constructible from iterators on pairs of Vertex_handle
Filtration_valueType for the value of the read filtration
Vertex_handleType for the value of the read vertices

File format: 1 simplex per line
Dim1 X11 X12 ... X1d Fil1
Dim2 X21 X22 ... X2d Fil2
etc

The vertices must be labeled from 0 to n-1. Every simplex must appear exactly once. Simplices of dimension more than 1 are ignored.

◆ read_hasse_simplex()

template<typename Simplex_key , typename Filtration_value >
bool Gudhi::read_hasse_simplex ( std::istream &  in_,
std::vector< Simplex_key > &  boundary,
Filtration_value fil 
)

Read a hasse simplex from a file.

File format: 1 simplex per line
Dim1 k11 k12 ... k1Dim1 Fil1
Dim2 k21 k22 ... k2Dim2 Fil2
etc

The key of a simplex is its position in the filtration order and also the number of its row in the file. Dimi ki1 ki2 ... kiDimi Fili means that the ith simplex in the filtration has dimension Dimi, filtration value fil1 and simplices with key ki1 ... kiDimi in its boundary.

◆ read_lower_triangular_matrix_from_csv_file()

template<typename Filtration_value >
std::vector<std::vector<Filtration_value> > Gudhi::read_lower_triangular_matrix_from_csv_file ( const std::string &  filename,
const char  separator = ';' 
)

Read a lower triangular distance matrix from a csv file. We assume that the .csv store the whole (square) matrix.

Author
Pawel Dlotko

Square matrix file format:
0;D12;...;D1j
D21;0;...;D2j
...
Dj1;Dj2;...;0

lower matrix file format:
0
D21;
D31;D32;
...
Dj1;Dj2;...;Dj(j-1);

◆ read_persistence_intervals_and_dimension()

template<typename OutputIterator >
void Gudhi::read_persistence_intervals_and_dimension ( std::string const &  filename,
OutputIterator  out 
)

Reads a file containing persistence intervals. Each line might contain 2, 3 or 4 values: [[field] dimension] birth death The output iterator out is used this way: *out++ = std::make_tuple(dim, birth, death); where dim is an int, birth a double, and death a double. Note: the function does not check that birth <= death.

◆ read_persistence_intervals_grouped_by_dimension()

std::map<int, std::vector<std::pair<double, double> > > Gudhi::read_persistence_intervals_grouped_by_dimension ( std::string const &  filename)
inline

Reads a file containing persistence intervals. Each line might contain 2, 3 or 4 values: [[field] dimension] birth death The return value is an std::map<dim, std::vector<std::pair<birth, death>>> where dim is an int, birth a double, and death a double. Note: the function does not check that birth <= death.

◆ read_persistence_intervals_in_dimension()

std::vector<std::pair<double, double> > Gudhi::read_persistence_intervals_in_dimension ( std::string const &  filename,
int  only_this_dim = -1 
)
inline

Reads a file containing persistence intervals. Each line might contain 2, 3 or 4 values: [[field] dimension] birth death If only_this_dim = -1, dimension is ignored and all lines are returned. If only_this_dim is >= 0, only the lines where dimension = only_this_dim (or where dimension is not specified) are returned. The return value is an std::vector<std::pair<birth, death>> where dim is an int, birth a double, and death a double. Note: the function does not check that birth <= death.

Examples
bottleneck_distance.cpp.

◆ read_points()

void Gudhi::read_points ( std::string  file_name,
std::vector< std::vector< double >> &  points 
)
inline

Read a set of points to turn it into a vector< vector<double> > by filling points.

File format: 1 point per line
X11 X12 ... X1d
X21 X22 ... X2d
etc

◆ read_simplex()

template<typename Vertex_handle , typename Filtration_value >
bool Gudhi::read_simplex ( std::istream &  in_,
std::vector< Vertex_handle > &  simplex,
Filtration_value fil 
)

Read a face from a file.

File format: 1 simplex per line
Dim1 X11 X12 ... X1d Fil1
Dim2 X21 X22 ... X2d Fil2
etc

The vertices must be labeled from 0 to n-1. Every simplex must appear exactly once. Simplices of dimension more than 1 are ignored.

◆ write_persistence_intervals_to_stream()

template<typename Persistence_interval_range >
void Gudhi::write_persistence_intervals_to_stream ( const Persistence_interval_range &  intervals,
std::ostream &  out = std::cout 
)

This function write a vector<Persistence_interval_common> to a stream