Gudhi::cover_complex::Cover_complex< Point > Class Template Reference

Cover complex data structure. More...

Public Member Functions

void set_type (const std::string &t)
 Specifies whether the type of the output simplicial complex. More...
 
void set_verbose (bool verb=false)
 Specifies whether the program should display information or not. More...
 
void set_subsampling (double constant, double power)
 Sets the constants used to subsample the data set. These constants are explained in [12]. More...
 
void set_mask (int nodemask)
 Sets the mask, which is a threshold integer such that nodes in the complex that contain a number of data points which is less than or equal to this threshold are not displayed. More...
 
bool read_point_cloud (const std::string &off_file_name)
 Reads and stores the input point cloud. More...
 
void set_graph_from_file (const std::string &graph_file_name)
 Creates a graph G from a file containing the edges. More...
 
void set_graph_from_OFF ()
 Creates a graph G from the triangulation given by the input .OFF file. More...
 
template<typename Distance >
void set_graph_from_rips (double threshold, Distance distance)
 Creates a graph G from a Rips complex. More...
 
template<typename Distance >
double set_graph_from_automatic_rips (Distance distance, int N=100)
 Creates a graph G from a Rips complex whose threshold value is automatically tuned with subsampling—see [12]. More...
 
void set_function_from_file (const std::string &func_file_name)
 Creates the function f from a file containing the function values. More...
 
void set_function_from_coordinate (int k)
 Creates the function f from the k-th coordinate of the point cloud P. More...
 
template<class InputRange >
void set_function_from_range (InputRange const &function)
 Creates the function f from a vector stored in memory. More...
 
double set_automatic_resolution ()
 Computes the optimal length of intervals (i.e. the smallest interval length avoiding discretization artifacts—see [12]) for a functional cover. More...
 
void set_resolution_with_interval_length (double reso)
 Sets a length of intervals from a value stored in memory. More...
 
void set_resolution_with_interval_number (int reso)
 Sets a number of intervals from a value stored in memory. More...
 
void set_gain (double g=0.3)
 Sets a gain from a value stored in memory (default value 0.3). More...
 
void set_cover_from_function ()
 Creates a cover C from the preimages of the function f. More...
 
void set_cover_from_file (const std::string &cover_file_name)
 Creates the cover C from a file containing the cover elements of each point (the order has to be the same as in the input file!). More...
 
template<typename Distance >
void set_cover_from_Voronoi (Distance distance, int m=100)
 Creates the cover C from the Vorono├» cells of a subsampling of the point cloud. More...
 
const std::vector< int > & subpopulation (int c)
 Returns the data subset corresponding to a specific node of the created complex. More...
 
void set_color_from_file (const std::string &color_file_name)
 Computes the function used to color the nodes of the simplicial complex from a file containing the function values. More...
 
void set_color_from_coordinate (int k=0)
 Computes the function used to color the nodes of the simplicial complex from the k-th coordinate. More...
 
void set_color_from_vector (std::vector< double > color)
 Computes the function used to color the nodes of the simplicial complex from a vector stored in memory. More...
 
void plot_DOT ()
 Creates a .dot file called SC.dot for neato (part of the graphviz package) once the simplicial complex is computed to get a visualization of its 1-skeleton in a .pdf file.
 
void write_info ()
 Creates a .txt file called SC.txt describing the 1-skeleton, which can then be plotted with e.g. KeplerMapper.
 
void plot_OFF ()
 Creates a .off file called SC.off for 3D visualization, which contains the 2-skeleton of the GIC. This function assumes that the cover has been computed with Voronoi. If data points are in 1D or 2D, the remaining coordinates of the points embedded in 3D are set to 0.
 
void compute_PD ()
 Computes the extended persistence diagram of the complex. More...
 
template<typename SimplicialComplex >
void compute_distribution (int N=100)
 Computes bootstrapped distances distribution. More...
 
double compute_distance_from_confidence_level (double alpha)
 Computes the bottleneck distance threshold corresponding to a specific confidence level. More...
 
double compute_confidence_level_from_distance (double d)
 Computes the confidence level of a specific bottleneck distance threshold. More...
 
double compute_p_value ()
 Computes the p-value, i.e. the opposite of the confidence level of the largest bottleneck distance preserving the points in the persistence diagram of the output simplicial complex. More...
 
template<typename SimplicialComplex >
void create_complex (SimplicialComplex &complex)
 Creates the simplicial complex. More...
 
void find_simplices ()
 Computes the simplices of the simplicial complex.
 

Detailed Description

template<typename Point>
class Gudhi::cover_complex::Cover_complex< Point >

Cover complex data structure.

The data structure is a simplicial complex, representing a Graph Induced simplicial Complex (GIC) or a Nerve, and whose simplices are computed with a cover C of a point cloud P, which often comes from the preimages of intervals covering the image of a function f defined on P. These intervals are parameterized by their resolution (either their length or their number) and their gain (percentage of overlap). To compute a GIC, one also needs a graph G built on top of P, whose cliques with vertices belonging to different elements of C correspond to the simplices of the GIC.

Examples:
Nerve_GIC/CoordGIC.cpp, Nerve_GIC/FuncGIC.cpp, Nerve_GIC/Nerve.cpp, and Nerve_GIC/VoronoiGIC.cpp.

Member Function Documentation

template<typename Point>
double Gudhi::cover_complex::Cover_complex< Point >::compute_confidence_level_from_distance ( double  d)
inline

Computes the confidence level of a specific bottleneck distance threshold.

Parameters
[in]dBottleneck distance.
template<typename Point>
double Gudhi::cover_complex::Cover_complex< Point >::compute_distance_from_confidence_level ( double  alpha)
inline

Computes the bottleneck distance threshold corresponding to a specific confidence level.

Parameters
[in]alphaConfidence level.
template<typename Point>
template<typename SimplicialComplex >
void Gudhi::cover_complex::Cover_complex< Point >::compute_distribution ( int  N = 100)
inline

Computes bootstrapped distances distribution.

Parameters
[in]Nnumber of bootstrap iterations.
template<typename Point>
double Gudhi::cover_complex::Cover_complex< Point >::compute_p_value ( )
inline

Computes the p-value, i.e. the opposite of the confidence level of the largest bottleneck distance preserving the points in the persistence diagram of the output simplicial complex.

template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::compute_PD ( )
inline

Computes the extended persistence diagram of the complex.

template<typename Point>
template<typename SimplicialComplex >
void Gudhi::cover_complex::Cover_complex< Point >::create_complex ( SimplicialComplex &  complex)
inline

Creates the simplicial complex.

Parameters
[in]complexSimplicialComplex to be created.
template<typename Point>
bool Gudhi::cover_complex::Cover_complex< Point >::read_point_cloud ( const std::string &  off_file_name)
inline

Reads and stores the input point cloud.

Parameters
[in]off_file_namename of the input .OFF or .nOFF file.
template<typename Point>
double Gudhi::cover_complex::Cover_complex< Point >::set_automatic_resolution ( )
inline

Computes the optimal length of intervals (i.e. the smallest interval length avoiding discretization artifacts—see [12]) for a functional cover.

Returns
reso interval length used to compute the cover.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_color_from_coordinate ( int  k = 0)
inline

Computes the function used to color the nodes of the simplicial complex from the k-th coordinate.

Parameters
[in]kcoordinate to use (start at 0).
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_color_from_file ( const std::string &  color_file_name)
inline

Computes the function used to color the nodes of the simplicial complex from a file containing the function values.

Parameters
[in]color_file_namename of the input color file.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_color_from_vector ( std::vector< double >  color)
inline

Computes the function used to color the nodes of the simplicial complex from a vector stored in memory.

Parameters
[in]colorinput vector of values.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_cover_from_file ( const std::string &  cover_file_name)
inline

Creates the cover C from a file containing the cover elements of each point (the order has to be the same as in the input file!).

Parameters
[in]cover_file_namename of the input cover file.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_cover_from_function ( )
inline

Creates a cover C from the preimages of the function f.

template<typename Point>
template<typename Distance >
void Gudhi::cover_complex::Cover_complex< Point >::set_cover_from_Voronoi ( Distance  distance,
int  m = 100 
)
inline

Creates the cover C from the Voronoï cells of a subsampling of the point cloud.

Parameters
[in]distancedistance between the points.
[in]mnumber of points in the subsample.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_function_from_coordinate ( int  k)
inline

Creates the function f from the k-th coordinate of the point cloud P.

Parameters
[in]kcoordinate to use (start at 0).
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_function_from_file ( const std::string &  func_file_name)
inline

Creates the function f from a file containing the function values.

Parameters
[in]func_file_namename of the input function file.
template<typename Point>
template<class InputRange >
void Gudhi::cover_complex::Cover_complex< Point >::set_function_from_range ( InputRange const &  function)
inline

Creates the function f from a vector stored in memory.

Parameters
[in]functioninput vector of values.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_gain ( double  g = 0.3)
inline

Sets a gain from a value stored in memory (default value 0.3).

Parameters
[in]ggain.
template<typename Point>
template<typename Distance >
double Gudhi::cover_complex::Cover_complex< Point >::set_graph_from_automatic_rips ( Distance  distance,
int  N = 100 
)
inline

Creates a graph G from a Rips complex whose threshold value is automatically tuned with subsampling—see [12].

Parameters
[in]distancedistance between data points.
[in]Nnumber of subsampling iteration (the default reasonable value is 100, but there is no guarantee on how to choose it).
Returns
delta threshold used for computing the Rips complex.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_graph_from_file ( const std::string &  graph_file_name)
inline

Creates a graph G from a file containing the edges.

Parameters
[in]graph_file_namename of the input graph file. The graph file contains one edge per line, each edge being represented by the IDs of its two nodes.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_graph_from_OFF ( )
inline

Creates a graph G from the triangulation given by the input .OFF file.

template<typename Point>
template<typename Distance >
void Gudhi::cover_complex::Cover_complex< Point >::set_graph_from_rips ( double  threshold,
Distance  distance 
)
inline

Creates a graph G from a Rips complex.

Parameters
[in]thresholdthreshold value for the Rips complex.
[in]distancedistance used to compute the Rips complex.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_mask ( int  nodemask)
inline

Sets the mask, which is a threshold integer such that nodes in the complex that contain a number of data points which is less than or equal to this threshold are not displayed.

Parameters
[in]nodemaskinteger.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_resolution_with_interval_length ( double  reso)
inline

Sets a length of intervals from a value stored in memory.

Parameters
[in]resolength of intervals.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_resolution_with_interval_number ( int  reso)
inline

Sets a number of intervals from a value stored in memory.

Parameters
[in]resonumber of intervals.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_subsampling ( double  constant,
double  power 
)
inline

Sets the constants used to subsample the data set. These constants are explained in [12].

Parameters
[in]constantdouble.
[in]powerdouble.
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_type ( const std::string &  t)
inline

Specifies whether the type of the output simplicial complex.

Parameters
[in]tstd::string (either "GIC" or "Nerve").
template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_verbose ( bool  verb = false)
inline

Specifies whether the program should display information or not.

Parameters
[in]verbboolean (true = display info, false = do not display info).
template<typename Point>
const std::vector<int>& Gudhi::cover_complex::Cover_complex< Point >::subpopulation ( int  c)
inline

Returns the data subset corresponding to a specific node of the created complex.

Parameters
[in]cID of the node.
Returns
cover_back(c) vector of IDs of data points.

The documentation for this class was generated from the following file:
GUDHI  Version 2.1.0  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.  - Copyright : GPL v3 Generated on Fri Feb 2 2018 14:51:32 for GUDHI by Doxygen 1.8.11