Gudhi::cubical_complex::counter Class Reference

This is an implementation of a counter being a vector of integers. More...

Public Member Functions

 counter (const std::vector< unsigned > &endd)
 
 counter (const std::vector< unsigned > &beginn, const std::vector< unsigned > &endd)
 
bool increment ()
 
bool isFinal ()
 
std::vector< unsigned > find_opposite (const std::vector< bool > &directionsForPeriodicBCond)
 
std::vector< bool > directions_of_finals ()
 

Friends

std::ostream & operator<< (std::ostream &out, const counter &c)
 

Detailed Description

This is an implementation of a counter being a vector of integers.

The constructor of the class takes as an input two vectors W and V. It assumes that W < V coordinatewise. If the initial counter W is not specified, it is assumed to be vector of zeros. The class allows to iterate between W and V by using increment() function. The increment() function returns a bool value. The current counter reach the end counter V if the value returned by the increment function is FALSE. This class is needed for the implementation of a bitmapCubicalComplex.

Constructor & Destructor Documentation

◆ counter() [1/2]

Gudhi::cubical_complex::counter::counter ( const std::vector< unsigned > &  endd)
inline

Constructor of a counter class. It takes only the parameter which is the end value of the counter. The default beginning value is a vector of the same length as the endd, filled-in with zeros.

◆ counter() [2/2]

Gudhi::cubical_complex::counter::counter ( const std::vector< unsigned > &  beginn,
const std::vector< unsigned > &  endd 
)
inline

Constructor of a counter class. It takes as the input beginn and end vector. It assumes that begin vector is lexicographically below the end vector.

Member Function Documentation

◆ directions_of_finals()

std::vector< bool > Gudhi::cubical_complex::counter::directions_of_finals ( )
inline

Function checking at which positions the current value of a counter is the final value of the counter.

◆ find_opposite()

std::vector< unsigned > Gudhi::cubical_complex::counter::find_opposite ( const std::vector< bool > &  directionsForPeriodicBCond)
inline

Function required in the implementation of bitmapCubicalComplexWPeriodicBoundaryCondition. Its aim is to find an counter corresponding to the element the following boundary element is identified with when periodic boundary conditions are imposed.

◆ increment()

bool Gudhi::cubical_complex::counter::increment ( )
inline

Function to increment the counter. If the value returned by the function is true, then the incrementation process was successful. If the value of the function is false, that means, that the counter have reached its end-value.

◆ isFinal()

bool Gudhi::cubical_complex::counter::isFinal ( )
inline

Function to check if we are at the end of counter.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const counter c 
)
friend

Function to write counter to the stream.


The documentation for this class was generated from the following file:
GUDHI  Version 3.1.1  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.  - Copyright : MIT Generated on Fri Feb 7 2020 16:35:36 for GUDHI by Doxygen 1.8.13