Loading...
Searching...
No Matches
Gudhi::cubical_complex::Bitmap_cubical_complex< T > Class Template Reference

Cubical complex represented as a bitmap. More...

#include <include/gudhi/Bitmap_cubical_complex.h>

Classes

class  Skeleton_simplex_range
 A range containing all the cells of dimension at most k. More...
 

Public Types

typedef std::vector< Simplex_handle >::iterator Boundary_simplex_iterator
 
typedef std::vector< Simplex_handle > Filtration_simplex_range
 

Public Member Functions

 Bitmap_cubical_complex (const char *perseus_style_file)
 
 Bitmap_cubical_complex (const std::vector< unsigned > &dimensions, const std::vector< Filtration_value > &cells, bool input_top_cells=true)
 
 Bitmap_cubical_complex (const std::vector< unsigned > &dimensions, const std::vector< Filtration_value > &cells, const std::vector< bool > &directions_in_which_periodic_b_cond_are_to_be_imposed, bool input_top_cells=true)
 
virtual ~Bitmap_cubical_complex ()
 
std::size_t num_simplices () const
 
std::size_t dimension () const
 
unsigned dimension (Simplex_handle sh) const
 
Filtration_value filtration (Simplex_handle sh)
 
Simplex_key key (Simplex_handle sh) const
 
Simplex_handle simplex (Simplex_key k)
 
void assign_key (Simplex_handle sh, Simplex_key key)
 
void initialize_filtration ()
 
Boundary_simplex_range boundary_simplex_range (Simplex_handle sh)
 
Filtration_simplex_range const & filtration_simplex_range ()
 
std::pair< Simplex_handle, Simplex_handle > endpoints (Simplex_handle e)
 
Skeleton_simplex_range skeleton_simplex_range (unsigned dimension)
 

Static Public Member Functions

static Simplex_handle null_simplex ()
 
static Simplex_key null_key ()
 

Detailed Description

template<typename T>
class Gudhi::cubical_complex::Bitmap_cubical_complex< T >

Cubical complex represented as a bitmap.

This is a Bitmap_cubical_complex class. It joints a functionalities of Bitmap_cubical_complex_base and Bitmap_cubical_complex_periodic_boundary_conditions_base classes into Gudhi persistent homology engine. It is a template class that inherit from its template parameter. The template parameter is supposed to be either Bitmap_cubical_complex_base or Bitmap_cubical_complex_periodic_boundary_conditions_base class.

This class implements the concept FilteredComplex.

Examples
Random_bitmap_cubical_complex.cpp, cubical_complex_persistence.cpp, and periodic_cubical_complex_persistence.cpp.

Member Typedef Documentation

◆ Boundary_simplex_iterator

template<typename T >
typedef std::vector<Simplex_handle>::iterator Gudhi::cubical_complex::Bitmap_cubical_complex< T >::Boundary_simplex_iterator

Boundary_simplex_range class provides ranges for boundary iterators.

◆ Filtration_simplex_range

template<typename T >
typedef std::vector<Simplex_handle> Gudhi::cubical_complex::Bitmap_cubical_complex< T >::Filtration_simplex_range

Range of all the cells in filtration order. Secondary criteria for filtration are: (1) Dimension of a cube (lower dimensional comes first). (2) Position in the data structure (the ones that are earliest in the data structure come first).

Constructor & Destructor Documentation

◆ Bitmap_cubical_complex() [1/3]

template<typename T >
Gudhi::cubical_complex::Bitmap_cubical_complex< T >::Bitmap_cubical_complex ( const char *  perseus_style_file)
inlineexplicit
Parameters
[in]perseus_style_fileThe name of a Perseus-style file.

◆ Bitmap_cubical_complex() [2/3]

template<typename T >
Gudhi::cubical_complex::Bitmap_cubical_complex< T >::Bitmap_cubical_complex ( const std::vector< unsigned > &  dimensions,
const std::vector< Filtration_value > &  cells,
bool  input_top_cells = true 
)
inline
Parameters
[in]dimensionsThe shape that should be used to interpret cells (in Fortran order).
[in]cellsThe filtration values of the top-dimensional cells if input_top_cells is true, and of the vertices otherwise.
[in]input_top_cellsIf true, cells represents top-dimensional cells. If false, it represents vertices.

◆ Bitmap_cubical_complex() [3/3]

template<typename T >
Gudhi::cubical_complex::Bitmap_cubical_complex< T >::Bitmap_cubical_complex ( const std::vector< unsigned > &  dimensions,
const std::vector< Filtration_value > &  cells,
const std::vector< bool > &  directions_in_which_periodic_b_cond_are_to_be_imposed,
bool  input_top_cells = true 
)
inline
Parameters
[in]dimensionsThe shape that should be used to interpret cells (in Fortran order).
[in]cellsThe filtration values of the top-dimensional cells if input_top_cells is true, and of the vertices otherwise.
[in]directions_in_which_periodic_b_cond_are_to_be_imposedSpecifies for each dimension (as per dimensions) if the space is periodic (true) or not (false), or in other words if the boundaries should be identified.
[in]input_top_cellsIf true, cells represents top-dimensional cells. If false, it represents vertices.

◆ ~Bitmap_cubical_complex()

template<typename T >
virtual Gudhi::cubical_complex::Bitmap_cubical_complex< T >::~Bitmap_cubical_complex ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ assign_key()

template<typename T >
void Gudhi::cubical_complex::Bitmap_cubical_complex< T >::assign_key ( Simplex_handle  sh,
Simplex_key  key 
)
inline

Assign key to a cube pointed by the Simplex_handle

◆ boundary_simplex_range()

template<typename T >
Boundary_simplex_range Gudhi::cubical_complex::Bitmap_cubical_complex< T >::boundary_simplex_range ( Simplex_handle  sh)
inline

boundary_simplex_range creates an object of a Boundary_simplex_range class that provides ranges for the Boundary_simplex_iterator.

◆ dimension() [1/2]

template<typename T >
std::size_t Gudhi::cubical_complex::Bitmap_cubical_complex< T >::dimension ( ) const
inline

Returns dimension of the complex.

◆ dimension() [2/2]

template<typename T >
unsigned Gudhi::cubical_complex::Bitmap_cubical_complex< T >::dimension ( Simplex_handle  sh) const
inline

Return dimension of a cell pointed by the Simplex_handle.

◆ endpoints()

template<typename T >
std::pair< Simplex_handle, Simplex_handle > Gudhi::cubical_complex::Bitmap_cubical_complex< T >::endpoints ( Simplex_handle  e)
inline

Returns the extremities of edge e

◆ filtration()

template<typename T >
Filtration_value Gudhi::cubical_complex::Bitmap_cubical_complex< T >::filtration ( Simplex_handle  sh)
inline

Return the filtration of a cell pointed by the Simplex_handle, or +inf for null_simplex().

◆ filtration_simplex_range()

template<typename T >
Filtration_simplex_range const & Gudhi::cubical_complex::Bitmap_cubical_complex< T >::filtration_simplex_range ( )
inline

Range of all the cells in filtration order. Secondary criteria for filtration are: (1) Dimension of a cube (lower dimensional comes first). (2) Position in the data structure (the ones that are earliest in the data structure come first).

This implicitly calls initialize_filtration() if it has never been called.

◆ initialize_filtration()

template<typename T >
void Gudhi::cubical_complex::Bitmap_cubical_complex< T >::initialize_filtration

Precompute a sorted list of the cells for filtration_simplex_range() and simplex(). It is automatically called by filtration_simplex_range() if needed, but NOT by simplex().

◆ key()

template<typename T >
Simplex_key Gudhi::cubical_complex::Bitmap_cubical_complex< T >::key ( Simplex_handle  sh) const
inline

Return the key of a cube pointed by the Simplex_handle.

◆ null_key()

template<typename T >
static Simplex_key Gudhi::cubical_complex::Bitmap_cubical_complex< T >::null_key ( )
inlinestatic

Return a key which is not a key of any cube in the considered data structure.

◆ null_simplex()

template<typename T >
static Simplex_handle Gudhi::cubical_complex::Bitmap_cubical_complex< T >::null_simplex ( )
inlinestatic

Returns a Simplex_handle to a cube that do not exist in this complex.

◆ num_simplices()

template<typename T >
std::size_t Gudhi::cubical_complex::Bitmap_cubical_complex< T >::num_simplices ( ) const
inline

Returns number of all cubes in the complex.

◆ simplex()

template<typename T >
Simplex_handle Gudhi::cubical_complex::Bitmap_cubical_complex< T >::simplex ( Simplex_key  k)
inline

Return the k-th Simplex_handle in filtration order.

Only available after initialize_filtration() or filtration_simplex_range() has been called.

◆ skeleton_simplex_range()

template<typename T >
Skeleton_simplex_range Gudhi::cubical_complex::Bitmap_cubical_complex< T >::skeleton_simplex_range ( unsigned  dimension)
inline

Returns a range containing all the cells of dimension at most dimension.


The documentation for this class was generated from the following file: