Gudhi Namespace Reference

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...
 
struct  linear_indexing_tag
 Tag for a linear ordering of simplices. More...
 
class  Minimal_enclosing_ball_radius
 Compute the radius of the minimal enclosing ball between Points given by a range of coordinates. The points are assumed to have the same dimension. More...
 
struct  Null_output_iterator
 
class  Off_reader
 OFF file reader top class visitor. More...
 
class  Persistence_interval_common
 
class  Points_3D_off_reader
 
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_off_reader
 OFF file reader implementation in order to read points from an OFF file. More...
 
class  Points_off_visitor_reader
 OFF file visitor implementation according to Off_reader in order to read points from an OFF file. More...
 
class  Simplex_tree
 Simplex Tree data structure for representing simplicial complexes. More...
 
struct  Simplex_tree_options_fast_persistence
 
struct  Simplex_tree_options_full_featured
 

Typedefs

template<typename SimplicialComplexForProximityGraph >
using Proximity_graph = typename boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS, 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

This file is part of the Gudhi Library. The Gudhi library (Geometric Understanding in Higher Dimensions) is a generic C++ library for computational topology.

Author(s): Pawel Dlotko

Copyright (C) 2016 Inria

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Typedef Documentation

◆ Proximity_graph

template<typename SimplicialComplexForProximityGraph >
using Gudhi::Proximity_graph = typedef typename boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS , 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
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.

◆ 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/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

GUDHI  Version 2.3.0  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.  - Copyright : GPL v3 Generated on Tue Sep 4 2018 14:33:00 for GUDHI by Doxygen 1.8.13