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 [18]. 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...
 
void set_point_cloud_from_range (const std::vector< std::vector< double > > &point_cloud)
 Reads and stores the input point cloud from vector stored in memory. More...
 
bool read_point_cloud (const std::string &off_file_name)
 Reads and stores the input point cloud from .(n)OFF file. 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...
 
void set_distances_from_range (const std::vector< std::vector< double > > &distance_matrix)
 Reads and stores the distance matrices from vector stored in memory. 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 [18]. 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 [18]) 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_range (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.
 
Persistence_diagram compute_PD ()
 Computes the extended persistence diagram of the complex. More...
 
void compute_distribution (unsigned 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

◆ compute_confidence_level_from_distance()

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.

◆ compute_distance_from_confidence_level()

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.

◆ compute_distribution()

template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::compute_distribution ( unsigned int  N = 100)
inline

Computes bootstrapped distances distribution.

Parameters
[in]Nnumber of bootstrap iterations.

◆ compute_p_value()

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.

◆ compute_PD()

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

Computes the extended persistence diagram of the complex.

◆ create_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.

◆ read_point_cloud()

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 from .(n)OFF file.

Parameters
[in]off_file_namename of the input .OFF or .nOFF file.

◆ set_automatic_resolution()

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 [18]) for a functional cover.

Returns
reso interval length used to compute the cover.

◆ set_color_from_coordinate()

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).

◆ set_color_from_file()

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.

◆ set_color_from_range()

template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_color_from_range ( 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.

◆ set_cover_from_file()

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.

◆ set_cover_from_function()

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.

◆ set_cover_from_Voronoi()

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.

◆ set_distances_from_range()

template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_distances_from_range ( const std::vector< std::vector< double > > &  distance_matrix)
inline

Reads and stores the distance matrices from vector stored in memory.

Parameters
[in]distance_matrixinput vector representing the distance matrix.

◆ set_function_from_coordinate()

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).

◆ set_function_from_file()

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.

◆ set_function_from_range()

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.

◆ set_gain()

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.

◆ set_graph_from_automatic_rips()

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 [18].

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.

◆ set_graph_from_file()

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.

◆ set_graph_from_OFF()

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.

◆ set_graph_from_rips()

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.

◆ set_mask()

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.

◆ set_point_cloud_from_range()

template<typename Point>
void Gudhi::cover_complex::Cover_complex< Point >::set_point_cloud_from_range ( const std::vector< std::vector< double > > &  point_cloud)
inline

Reads and stores the input point cloud from vector stored in memory.

Parameters
[in]point_cloudinput vector representing the point cloud. Each row is a point and each coordinate is a vector.

◆ set_resolution_with_interval_length()

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.

◆ set_resolution_with_interval_number()

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.

◆ set_subsampling()

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 [18].

Parameters
[in]constantdouble.
[in]powerdouble.

◆ set_type()

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").

◆ set_verbose()

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).

◆ subpopulation()

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 3.3.0  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.  - Copyright : MIT Generated on Tue Aug 11 2020 11:09:13 for GUDHI by Doxygen 1.8.13