CGAL 6.2 - Homological Discrete Vector Fields
Loading...
Searching...
No Matches
CGAL::Homological_discrete_vector_field Namespace Reference

Classes

class  Abstract_simplicial_chain_complex
 The class Abstract_simplicial_chain_complex represents (topological) chain complexes associated to abstract simplicial complexes. More...
 
struct  Cell_pair
 Structure to represent data for HDVF operations (pairs of cells). More...
 
class  Complex_duality_data_t
 Type returned by dualize_complex(). More...
 
class  Cub_object_io
 The class Cub_object_io is an intermediate IO class, used to load binary volumes and produce cubical complexes. More...
 
class  Cubical_chain_complex
 The class Cubical_chain_complex represents (topological) chain complexes associated to cubical complexes. More...
 
class  Duality_cubical_complex_tools
 The class Duality_cubical_complex_tools is dedicated to Alexander duality for 3D binary volumes. More...
 
class  Duality_simplicial_complex_tools
 The class Duality_simplicial_complex_tools is dedicated to Alexander duality for 3D surface meshes. More...
 
class  Filtration_core
 The class Filtration_core implements data structures and methods required by the Filtration concept. More...
 
class  Filtration_lower_star
 The class Filtration_lower_star implements the lower star filtration on a given complex implementing the concept AbstractChainComplex. More...
 
class  Hdvf
 The class Hdvf implements homology and cohomology computation via homological discrete vector fields (HDVF for short). More...
 
class  Hdvf_core
 The class Hdvf_core is the core implementation of homological discrete vector fields (HDVF for short). More...
 
class  Hdvf_duality
 The class Hdvf_duality is the implementation of homological discrete vector fields (HDVF for short) for Alexander duality computation. More...
 
class  Hdvf_persistence
 The class Hdvf_persistence computes persistent homology using HDVFs (over a ring of coefficients which should actually be a field). More...
 
struct  Hdvf_traits_2
 The class Hdvf_traits_2 implements the HDVFTraits concept for 2D data, using a geometric kernel K. More...
 
struct  Hdvf_traits_3
 The class Hdvf_traits_3 implements the HDVFTraits concept for 3D data, using a geometric kernel K. More...
 
struct  Hdvf_traits_d
 The class Hdvf_traits_d implements the HDVFTraits concept for dD data, using a geometric kernel K. More...
 
class  Icosphere_object_io
 
class  Mesh_object_io
 The class Mesh_object_io is an intermediate IO class, used to load triangular/tetraedral meshes and produce simplicial complexes. More...
 
class  Simplex
 The class Simplex is used by the class Abstract_simplicial_chain_complex to represent a simplex (i.e. cells of a simplicial complex). More...
 
class  Simplicial_chain_complex
 The class Simplicial_chain_complex refines the Abstract_simplicial_chain_complex class by assigning coordinates to vertices (i.e. 0-simplices). More...
 
class  Sub_chain_complex_mask
 The class Sub_chain_complex_mask is a technical class implementing a sub chain complex. More...
 
class  Surface_mesh_io
 The class Surface_mesh_io is an intermediate IO class, used to load a triangle mesh and produce simplicial complexes. More...
 
class  Tet_object_io
 
class  Triangulation_3_io
 The class Triangulation_3_io is an intermediate IO class, used to load a Triangulation_3 and produce simplicial complexes. More...
 

Typedefs

typedef std::vector< size_t > IOCubCellType
 Type of cells coordinates in Cub_object_io (Khalimsky or voxel coordinates)
 
typedef std::vector< IOCubCellTypeIOCubChainType
 Type of pre-chains in Cub_object_io (list of cells without coefficients).
 
typedef std::pair< std::size_t, int > Cell
 Type for indexing uniquely a cell.
 
typedef std::vector< size_t > Io_cell_type
 Type of cells of Mesh_object_io.
 
typedef std::vector< Io_cell_typeIo_chain_type
 Type of pre-chains in Mesh_object_io (list of cells without coefficients).
 

Enumerations

enum  PSC_flag { PRIMARY , SECONDARY , CRITICAL , NONE }
 HDVF Enum for the label of cells. More...
 

Functions

template<typename CoefficientRing >
std::ostream & operator<< (std::ostream &out, const Abstract_simplicial_chain_complex< CoefficientRing > &complex)
 
template<typename CoefficientRing , typename Traits >
std::ostream & operator<< (std::ostream &out, const Cubical_chain_complex< CoefficientRing, Traits > &complex)
 
template<typename ChainComplex , typename P >
std::function< double(size_t)> degree_function (const ChainComplex &complex, const std::function< double(const P &)> &f)
 Degree function from a coordinates to scalar map.
 
std::ostream & operator<< (std::ostream &out, const std::vector< Cell_pair > &pairs)
 Overload of operator<< for Cell_pair type.
 
template<typename ChainComplex , typename Degree , typename Filtration_ >
std::ostream & operator<< (std::ostream &out_stream, const typename Hdvf_persistence< ChainComplex, Degree, Filtration_ >::Persistence_interval &hole)
 
std::ostream & operator<< (std::ostream &out, const Cell_pair &p)
 
template<typename ChainComplex >
void interaction_loop (Hdvf< ChainComplex > &hdvf, ChainComplex &complex, const std::function< void(Hdvf< ChainComplex > &hdvf, ChainComplex &complex)> &output_vtk)
 Runs an interaction loop to iterated M, W or MW operations and export the results to vtk.
 
bool check_sanity_line (const std::string &line, const std::string &file)
 
bool get_next_uncommented_line (std::ifstream &infile, std::string &result)
 
template<typename Traits >
size_t read_nodes (const std::string &filename, std::vector< typename Traits::Point > *nodes, bool adapt=false)
 Load nodes from a .nodes file.
 

Variables

std::function< double(const std::vector< double > &)> f_x
 For lower star filtration along x: function mapping coordinates to x.
 
std::function< double(const std::vector< double > &)> f_y
 For lower star filtration along y: function mapping coordinates to y.
 
std::function< double(const std::vector< double > &)> f_z
 For lower star filtration along z: function mapping coordinates to z.
 
const int OPT_BND = 0b0001
 HDVF option (compute only reduced boundary).
 
const int OPT_F = 0b0010
 HDVF option (compute only reduced boundary and f).
 
const int OPT_G = 0b0100
 HDVF option (compute only reduced boundary and g).
 
const int OPT_FULL = 0b1000
 HDVF option (compute full reduction).
 
static std::vector< size_t > VTK_types_IO = {1, 3, 5, 10}
 

Typedef Documentation

◆ Cell

typedef std::pair<std::size_t, int> CGAL::Homological_discrete_vector_field::Cell

Type for indexing uniquely a cell.

  • First element of the pair: index of the cell.
  • Second element of the pair: dimension of the cell.

◆ Io_cell_type

Type of cells of Mesh_object_io.

Sorted vector of the vertex indices.

Enumeration Type Documentation

◆ PSC_flag

HDVF Enum for the label of cells.

Enumerator
PRIMARY 
SECONDARY 
CRITICAL 
NONE 

Function Documentation

◆ interaction_loop()

template<typename ChainComplex >
void CGAL::Homological_discrete_vector_field::interaction_loop ( Hdvf< ChainComplex > &  hdvf,
ChainComplex &  complex,
const std::function< void(Hdvf< ChainComplex > &hdvf, ChainComplex &complex)> &  output_vtk 
)

Runs an interaction loop to iterated M, W or MW operations and export the results to vtk.

The loop runs until the key Q is pressed. Otherwise, the loop asks for an operation (M, W or MW) and a cell (index and dimension). Then all possible paired cells are listed and the user can chose one of them (or none).

◆ read_nodes()

template<typename Traits >
size_t CGAL::Homological_discrete_vector_field::read_nodes ( const std::string &  filename,
std::vector< typename Traits::Point > *  nodes,
bool  adapt = false 
)

Load nodes from a .nodes file.

Load vertices coordinates from a .nodes file.

Parameters
filenameName of the input file.
nodesPointer to a vector of points into which nodes are outputed.
adaptIf fill is false, nodes must have the same dimension as the traits Point, if true, nodes dimension can be lower (and missing coordinates are filled with zeros) or higher (and coordinates are truncated to the traits dimension).

Variable Documentation

◆ f_x

std::function<double(const std::vector<double>&)> CGAL::Homological_discrete_vector_field::f_x
Initial value:
= [](const std::vector<double>& v)
{
return (v.at(0)) ;
}

For lower star filtration along x: function mapping coordinates to x.

◆ f_y

std::function<double(const std::vector<double>&)> CGAL::Homological_discrete_vector_field::f_y
Initial value:
= [](const std::vector<double>& v)
{
return (v.at(1)) ;
}

For lower star filtration along y: function mapping coordinates to y.

◆ f_z

std::function<double(const std::vector<double>&)> CGAL::Homological_discrete_vector_field::f_z
Initial value:
= [](const std::vector<double>& v)
{
return (v.at(2)) ;
}

For lower star filtration along z: function mapping coordinates to z.