11#ifndef BITMAP_CUBICAL_COMPLEX_BASE_H_ 
   12#define BITMAP_CUBICAL_COMPLEX_BASE_H_ 
   14#include <gudhi/Debug_utils.h> 
   16#include <boost/config.hpp> 
   17#include <boost/iterator/counting_iterator.hpp> 
   18#include <boost/range/iterator_range.hpp> 
   35namespace cubical_complex {
 
   59  typedef T filtration_type;
 
  159    std::vector<unsigned> coface_counter = this->compute_counter_for_given_cell(coface);
 
  160    std::vector<unsigned> face_counter = this->compute_counter_for_given_cell(face);
 
  163    int number_of_position_in_which_counters_do_not_agree = -1;
 
  164    std::size_t number_of_full_faces_that_comes_before = 0;
 
  165    for (std::size_t i = 0; i != coface_counter.size(); ++i) {
 
  166      if ((coface_counter[i] % 2 == 1) && (number_of_position_in_which_counters_do_not_agree == -1)) {
 
  167        ++number_of_full_faces_that_comes_before;
 
  169      if (coface_counter[i] != face_counter[i]) {
 
  170        if (number_of_position_in_which_counters_do_not_agree != -1) {
 
  171          std::cerr << 
"Cells given to compute_incidence_between_cells procedure do not form a pair of coface-face.\n";
 
  172          throw std::logic_error(
 
  173              "Cells given to compute_incidence_between_cells procedure do not form a pair of coface-face.");
 
  175        number_of_position_in_which_counters_do_not_agree = i;
 
  180    if (number_of_full_faces_that_comes_before % 2) incidence = -1;
 
  182    if (coface_counter[number_of_position_in_which_counters_do_not_agree] + 1 ==
 
  183        face_counter[number_of_position_in_which_counters_do_not_agree]) {
 
  227  inline unsigned dimension()
 const { 
return sizes.size(); }
 
  232  inline std::size_t 
size()
 const { 
return this->data.size(); }
 
  291  typedef typename std::vector<std::size_t> Boundary_range;
 
  303  typedef typename std::vector<std::size_t> Coboundary_range;
 
  317    typedef std::input_iterator_tag iterator_category;
 
  318    typedef std::size_t value_type;
 
  319    typedef std::ptrdiff_t difference_type;
 
  320    typedef value_type* pointer;
 
  321    typedef value_type reference;
 
  328      while ((dim != this->b->
dimension()) && (this->counter[dim] == this->b->sizes[dim] - 1)) ++dim;
 
  331        ++this->counter[dim];
 
  332        for (std::size_t i = 0; i != dim; ++i) {
 
  333          this->counter[i] = 0;
 
  348      if (this->b != rhs.b) 
return false;
 
  349      if (this->counter.size() != rhs.counter.size()) 
return false;
 
  350      for (std::size_t i = 0; i != this->counter.size(); ++i) {
 
  351        if (this->counter[i] != rhs.counter[i]) 
return false;
 
  365    std::size_t operator*() { 
return this->compute_index_in_bitmap(); }
 
  367    std::size_t compute_index_in_bitmap()
 const {
 
  368      std::size_t index = 0;
 
  369      for (std::size_t i = 0; i != this->counter.size(); ++i) {
 
  370        index += (2 * this->counter[i] + 1) * this->b->multipliers[i];
 
  375    void print_counter()
 const {
 
  376      for (std::size_t i = 0; i != this->counter.size(); ++i) {
 
  377        std::clog << this->counter[i] << 
" ";
 
  383    std::vector<std::size_t> counter;
 
  400    for (std::size_t i = 0; i != this->
dimension(); ++i) {
 
  401      a.counter[i] = this->sizes[i] - 1;
 
  429  class Vertices_iterator {
 
  431    typedef std::input_iterator_tag iterator_category;
 
  432    typedef std::size_t value_type;
 
  433    typedef std::ptrdiff_t difference_type;
 
  434    typedef value_type* pointer;
 
  435    typedef value_type reference;
 
  439    Vertices_iterator operator++() {
 
  442      while ((dim != this->b->dimension()) && (this->counter[dim] == this->b->sizes[dim])) ++dim;
 
  444      if (dim != this->b->dimension()) {
 
  445        ++this->counter[dim];
 
  446        for (std::size_t i = 0; i != dim; ++i) {
 
  447          this->counter[i] = 0;
 
  455    Vertices_iterator operator++(
int) {
 
  456      Vertices_iterator result = *
this;
 
  461    bool operator==(
const Vertices_iterator& rhs)
 const {
 
  462      if (this->b != rhs.b) 
return false;
 
  463      GUDHI_CHECK(this->counter.size() == rhs.counter.size(), 
"impossible");
 
  464      for (std::size_t i = 0; i != this->counter.size(); ++i) {
 
  465        if (this->counter[i] != rhs.counter[i]) 
return false;
 
  470    bool operator!=(
const Vertices_iterator& rhs)
 const { 
return !(*
this == rhs); }
 
  479    std::size_t operator*()
 const { 
return this->compute_index_in_bitmap(); }
 
  481    std::size_t compute_index_in_bitmap()
 const {
 
  482      std::size_t index = 0;
 
  483      for (std::size_t i = 0; i != this->counter.size(); ++i) {
 
  484        index += 2 * this->counter[i] * this->b->multipliers[i];
 
  489    void print_counter()
 const {
 
  490      for (std::size_t i = 0; i != this->counter.size(); ++i) {
 
  491        std::clog << this->counter[i] << 
" ";
 
  497    std::vector<std::size_t> counter;
 
  504  Vertices_iterator vertices_iterator_begin() {
 
  505    Vertices_iterator a(
this);
 
  512  Vertices_iterator vertices_iterator_end() {
 
  513    Vertices_iterator a(
this);
 
  514    for (std::size_t i = 0; i != this->
dimension(); ++i) {
 
  515      a.counter[i] = this->sizes[i];
 
  524  class Vertices_range {
 
  528    Vertices_iterator begin() { 
return b->vertices_iterator_begin(); }
 
  530    Vertices_iterator end() { 
return b->vertices_iterator_end(); }
 
  537  Vertices_range vertices_range() { 
return Vertices_range(
this); }
 
  544  inline std::size_t number_cells()
 const { 
return this->data.size(); }
 
  552  template <
class F> 
void for_each_vertex(F&&f) {
 
  553    for_each_vertex_rec(f, 0, multipliers.size()-1);
 
  557  std::vector<unsigned> sizes;
 
  558  std::vector<unsigned> multipliers;
 
  561  template <
class F> 
void for_each_vertex_rec(F&&f, std::size_t base, 
int dim);
 
  562  void propagate_from_vertices_rec(
int special_dim, 
int current_dim, std::size_t base);
 
  564  void set_up_containers(
const std::vector<unsigned>& sizes, 
bool is_pos_inf) {
 
  566    unsigned multiplier = 1;
 
  567    for (std::size_t i = 0; i != sizes.size(); ++i) {
 
  568      this->sizes.push_back(sizes[i]);
 
  569      this->multipliers.push_back(multiplier);
 
  570      multiplier *= 2 * sizes[i] + 1;
 
  573      this->data = std::vector<T>(multiplier, std::numeric_limits<T>::infinity());
 
  575      this->data = std::vector<T>(multiplier, -std::numeric_limits<T>::infinity());
 
  578  std::size_t compute_position_in_bitmap(
const std::vector<unsigned>& counter) {
 
  579    std::size_t position = 0;
 
  580    for (std::size_t i = 0; i != this->multipliers.size(); ++i) {
 
  581      position += this->multipliers[i] * counter[i];
 
  586  std::vector<unsigned> compute_counter_for_given_cell(std::size_t cell)
 const {
 
  587    std::vector<unsigned> counter;
 
  588    counter.reserve(this->sizes.size());
 
  589    for (std::size_t dim = this->sizes.size(); dim > 1; --dim) {
 
  590      std::size_t quot = cell / this->multipliers[dim - 1];
 
  591      cell = cell % this->multipliers[dim - 1];
 
  592      counter.push_back(quot);
 
  595    counter.push_back(cell);
 
  596    std::reverse(counter.begin(), counter.end());
 
  599  void read_perseus_style_file(
const char* perseus_style_file);
 
  600  void setup_bitmap_based_on_top_dimensional_cells_list(
const std::vector<unsigned>& sizes_in_following_directions,
 
  601                                                        const std::vector<T>& top_dimensional_cells);
 
  602  void setup_bitmap_based_on_vertices(
const std::vector<unsigned>& sizes_in_following_directions,
 
  603                                      const std::vector<T>& vertices);
 
  607                              const std::vector<bool>& directions, 
bool input_top_cells);
 
  613  std::pair<T, T> min_max = this->min_max_filtration();
 
  614  T dx = (min_max.second - min_max.first) / (T)number_of_bins;
 
  617  for (std::size_t i = 0; i != this->data.size(); ++i) {
 
  619    std::clog << 
"Before binning : " << this->data[i] << std::endl;
 
  621    this->data[i] = min_max.first + dx * (this->data[i] - min_max.first) / number_of_bins;
 
  623    std::clog << 
"After binning : " << this->data[i] << std::endl;
 
  630  std::pair<T, T> min_max = this->min_max_filtration();
 
  632  std::size_t number_of_bins = (min_max.second - min_max.first) / diameter_of_bin;
 
  634  for (std::size_t i = 0; i != this->data.size(); ++i) {
 
  636    std::clog << 
"Before binning : " << this->data[i] << std::endl;
 
  638    this->data[i] = min_max.first + diameter_of_bin * (this->data[i] - min_max.first) / number_of_bins;
 
  640    std::clog << 
"After binning : " << this->data[i] << std::endl;
 
  647  std::pair<T, T> min_max(std::numeric_limits<T>::infinity(), -std::numeric_limits<T>::infinity());
 
  648  for (std::size_t i = 0; i != this->data.size(); ++i) {
 
  649    if (this->data[i] < min_max.first) min_max.first = this->data[i];
 
  650    if (this->data[i] > min_max.second) min_max.second = this->data[i];
 
  657  this->set_up_containers(sizes, 
true);
 
  662    const std::vector<unsigned>& sizes_in_following_directions, 
const std::vector<T>& top_dimensional_cells) {
 
  663  this->set_up_containers(sizes_in_following_directions, 
true);
 
  664  std::size_t number_of_top_dimensional_elements = std::accumulate(std::begin(sizes_in_following_directions),
 
  665                                                   std::end(sizes_in_following_directions), std::size_t(1),
 
  666                                                   std::multiplies<std::size_t>());
 
  667  if (number_of_top_dimensional_elements != top_dimensional_cells.size()) {
 
  668    std::cerr << 
"Error in constructor Bitmap_cubical_complex_base ( std::vector<unsigned> " 
  669              << 
"sizes_in_following_directions, std::vector<T> top_dimensional_cells ). Number of top dimensional " 
  670              << 
"elements that follow from sizes_in_following_directions vector is different from the size of " 
  671              << 
"top_dimensional_cells vector." 
  673    throw std::invalid_argument(
 
  674        "Error in constructor Bitmap_cubical_complex_base( std::vector<unsigned> sizes_in_following_directions," 
  675        "std::vector<T> top_dimensional_cells ). Number of top dimensional elements that follow from " 
  676        "sizes_in_following_directions vector is different from the size of top_dimensional_cells vector.");
 
  679  std::size_t index = 0;
 
  680  for (
auto it = this->top_dimensional_cells_iterator_begin();
 
  681       it != this->top_dimensional_cells_iterator_end(); ++it) {
 
  682    this->get_cell_data(*it) = top_dimensional_cells[index];
 
  685  this->impose_lower_star_filtration();
 
  689void Bitmap_cubical_complex_base<T>::setup_bitmap_based_on_vertices(
const std::vector<unsigned>& sizes_in_following_directions,
 
  690                                                                    const std::vector<T>& vertices) {
 
  691  std::vector<unsigned> top_cells_sizes;
 
  692  std::transform (sizes_in_following_directions.begin(), sizes_in_following_directions.end(), std::back_inserter(top_cells_sizes),
 
  693               [](
int i){ return i-1;});
 
  694  this->set_up_containers(top_cells_sizes, 
false);
 
  695  std::size_t number_of_vertices = std::accumulate(std::begin(sizes_in_following_directions),
 
  696                                                   std::end(sizes_in_following_directions), (std::size_t)1,
 
  697                                                   std::multiplies<std::size_t>());
 
  698  if (number_of_vertices != vertices.size()) {
 
  699    std::cerr << 
"Error in constructor Bitmap_cubical_complex_base ( std::vector<unsigned> " 
  700              << 
"sizes_in_following_directions, std::vector<T> vertices ). Number of vertices " 
  701              << 
"elements that follow from sizes_in_following_directions vector is different from the size of " 
  702              << 
"vertices vector." 
  704    throw std::invalid_argument(
 
  705        "Error in constructor Bitmap_cubical_complex_base( std::vector<unsigned> sizes_in_following_directions," 
  706        "std::vector<T> vertices ). Number of vertices elements that follow from " 
  707        "sizes_in_following_directions vector is different from the size of vertices vector.");
 
  710  for_each_vertex([
this, &vertices, index=(std::size_t)0] (
auto cell) 
mutable { get_cell_data(cell) = vertices[index++]; });
 
  711  this->impose_lower_star_filtration_from_vertices();
 
  716  if (this->get_dimension_of_a_cell(splx) == this->dimension()){
return splx;}
 
  718    for (
auto v : this->get_coboundary_of_a_cell(splx)){
 
  719      if(this->get_cell_data(v) == this->get_cell_data(splx)){
 
  720        return this->get_top_dimensional_coface_of_a_cell(v);
 
  724  BOOST_UNREACHABLE_RETURN(-2);
 
  729  if (this->get_dimension_of_a_cell(splx) == 0){
return splx;}
 
  731    for (
auto v : this->get_boundary_of_a_cell(splx)){
 
  732      if(this->get_cell_data(v) == this->get_cell_data(splx)){
 
  733        return this->get_vertex_of_a_cell(v);
 
  737  BOOST_UNREACHABLE_RETURN(-2);
 
  742                                                            const std::vector<T>& cells, 
bool input_top_cells) {
 
  743  if (input_top_cells) {
 
  744    this->setup_bitmap_based_on_top_dimensional_cells_list(sizes_in_following_directions, cells);
 
  746    this->setup_bitmap_based_on_vertices(sizes_in_following_directions, cells);
 
  752  std::ifstream inFiltration(perseus_style_file);
 
  753  if(!inFiltration) 
throw std::ios_base::failure(std::string(
"Could not open the file ") + perseus_style_file);
 
  754  unsigned dimensionOfData;
 
  755  inFiltration >> dimensionOfData;
 
  758  std::clog << 
"dimensionOfData : " << dimensionOfData << std::endl;
 
  761  std::vector<unsigned> sizes;
 
  762  sizes.reserve(dimensionOfData);
 
  764  std::size_t dimensions = 1;
 
  765  for (std::size_t i = 0; i != dimensionOfData; ++i) {
 
  766    unsigned size_in_this_dimension;
 
  767    inFiltration >> size_in_this_dimension;
 
  768    sizes.push_back(size_in_this_dimension);
 
  769    dimensions *= size_in_this_dimension;
 
  771    std::clog << 
"size_in_this_dimension : " << size_in_this_dimension << std::endl;
 
  774  this->set_up_containers(sizes, 
true);
 
  776  Bitmap_cubical_complex_base<T>::Top_dimensional_cells_iterator it = this->top_dimensional_cells_iterator_begin();
 
  778  T filtrationLevel = 0.;
 
  779  std::size_t filtration_counter = 0;
 
  780  while (!inFiltration.eof()) {
 
  782    getline(inFiltration, line);
 
  783    if (line.length() != 0) {
 
  784      int n = sscanf(line.c_str(), 
"%lf", &filtrationLevel);
 
  786        std::string perseus_error(
"Bad Perseus file format. This line is incorrect : " + line);
 
  787        throw std::ios_base::failure(perseus_error.c_str());
 
  791      std::clog << 
"Cell of an index : " << it.compute_index_in_bitmap()
 
  792                << 
" and dimension: " << this->get_dimension_of_a_cell(it.compute_index_in_bitmap())
 
  793                << 
" get the value : " << filtrationLevel << std::endl;
 
  795      this->get_cell_data(*it) = filtrationLevel;
 
  797      ++filtration_counter;
 
  801  if (filtration_counter != dimensions) {
 
  802    std::string perseus_error(
"Bad Perseus file format. Read " + std::to_string(filtration_counter) + 
" expected " + \
 
  803      std::to_string(dimensions) + 
" values");
 
  804    throw std::ios_base::failure(perseus_error);
 
  807  inFiltration.close();
 
  808  this->impose_lower_star_filtration();
 
  813                                                            const std::vector<bool>& directions) {
 
  817  this->read_perseus_style_file(perseus_style_file);
 
  822                                                            const std::vector<bool>& directions) {
 
  826  this->set_up_containers(sizes, 
true);
 
  831                                                            const std::vector<T>& cells,
 
  832                                                            const std::vector<bool>& directions,
 
  833                                                            bool input_top_cells) {
 
  837  if (input_top_cells) {
 
  838    this->setup_bitmap_based_on_top_dimensional_cells_list(dimensions, cells);
 
  840    this->setup_bitmap_based_on_vertices(dimensions, cells);
 
  846  this->read_perseus_style_file(perseus_style_file);
 
  851  std::vector<std::size_t> boundary_elements;
 
  854  boundary_elements.reserve(this->dimension() * 2);
 
  856  std::size_t sum_of_dimensions = 0;
 
  857  std::size_t cell1 = cell;
 
  858  for (std::size_t i = this->multipliers.size(); i > 1; --i) {
 
  859    unsigned position = cell1 / this->multipliers[i - 1];
 
  860    cell1 = cell1 % this->multipliers[i - 1];
 
  861    if (position % 2 == 1) {
 
  862      if (sum_of_dimensions % 2) {
 
  863        boundary_elements.push_back(cell + this->multipliers[i - 1]);
 
  864        boundary_elements.push_back(cell - this->multipliers[i - 1]);
 
  866        boundary_elements.push_back(cell - this->multipliers[i - 1]);
 
  867        boundary_elements.push_back(cell + this->multipliers[i - 1]);
 
  873  if (cell1 % 2 == 1) {
 
  874    if (sum_of_dimensions % 2) {
 
  875      boundary_elements.push_back(cell + 1);
 
  876      boundary_elements.push_back(cell - 1);
 
  878      boundary_elements.push_back(cell - 1);
 
  879      boundary_elements.push_back(cell + 1);
 
  884  return boundary_elements;
 
  889  std::vector<unsigned> counter = this->compute_counter_for_given_cell(cell);
 
  890  std::vector<std::size_t> coboundary_elements;
 
  891  std::size_t cell1 = cell;
 
  892  for (std::size_t i = this->multipliers.size(); i > 1; --i) {
 
  894    unsigned position = cell1 / this->multipliers[i - 1];
 
  895    cell1 = cell1 % this->multipliers[i - 1];
 
  896    if (position % 2 == 0) {
 
  897      if ((cell > this->multipliers[i - 1]) && (counter[i - 1] != 0)) {
 
  898        coboundary_elements.push_back(cell - this->multipliers[i - 1]);
 
  900      if ((cell + this->multipliers[i - 1] < this->data.size()) && (counter[i - 1] != 2 * this->sizes[i - 1])) {
 
  901        coboundary_elements.push_back(cell + this->multipliers[i - 1]);
 
  905  if (cell1 % 2 == 0) {
 
  906    if ((cell > 1) && (counter[0] != 0)) {
 
  907      coboundary_elements.push_back(cell - 1);
 
  909    if ((cell + 1 < this->data.size()) && (counter[0] != 2 * this->sizes[0])) {
 
  910      coboundary_elements.push_back(cell + 1);
 
  913  return coboundary_elements;
 
  919  std::clog << 
"\n\n\n Computing position o a cell of an index : " << cell << std::endl;
 
  921  unsigned dimension = 0;
 
  922  for (std::size_t i = this->multipliers.size(); i > 1; --i) {
 
  923    unsigned position = cell / this->multipliers[i - 1];
 
  924    std::size_t newcell = cell % this->multipliers[i - 1];
 
  927    std::clog << 
"i-1 :" << i - 1 << std::endl;
 
  928    std::clog << 
"cell : " << cell << std::endl;
 
  929    std::clog << 
"position : " << position << std::endl;
 
  930    std::clog << 
"multipliers[" << i - 1 << 
"] = " << this->multipliers[i - 1] << std::endl;
 
  933    if (position % 2 == 1) {
 
  935      std::clog << 
"Nonzero length in this direction \n";
 
  943  std::clog << 
"i-1 :" << 0 << std::endl;
 
  944  std::clog << 
"cell : " << cell << std::endl;
 
  945  std::clog << 
"position : " << cell << std::endl;
 
  946  std::clog << 
"multipliers[" << 0 << 
"] = " << 1 << std::endl;
 
  951    std::clog << 
"Nonzero length in this direction \n";
 
  961  return this->data[cell];
 
  967  std::vector<bool> is_this_cell_considered(this->data.size(), 
false);
 
  969  std::vector<std::size_t> indices_to_consider;
 
  972  for (
auto it = this->top_dimensional_cells_iterator_begin();
 
  973       it != this->top_dimensional_cells_iterator_end(); ++it) {
 
  974    indices_to_consider.push_back(it.compute_index_in_bitmap());
 
  977  while (indices_to_consider.size()) {
 
  979    std::clog << 
"indices_to_consider in this iteration \n";
 
  980    for (
auto index : indices_to_consider) {
 
  981      std::clog << index << 
"  ";
 
  984    std::vector<std::size_t> new_indices_to_consider;
 
  985    for (
auto index : indices_to_consider) {
 
  986      std::vector<std::size_t> bd = this->get_boundary_of_a_cell(index);
 
  987      for (
auto boundary : bd) {
 
  989        std::clog << 
"filtration of a cell : " << boundary << 
" is : " << this->data[boundary]
 
  990                  << 
" while of a cell: " << index << 
" is: " << this->data[index]
 
  993        if (this->data[boundary] > this->data[index]) {
 
  994          this->data[boundary] = this->data[index];
 
  996          std::clog << 
"Setting the value of a cell : " << boundary
 
  997                    << 
" to : " << this->data[index] << std::endl;
 
 1000        if (is_this_cell_considered[boundary] == 
false) {
 
 1001          new_indices_to_consider.push_back(boundary);
 
 1002          is_this_cell_considered[boundary] = 
true;
 
 1006    indices_to_consider.swap(new_indices_to_consider);
 
 1010template <
typename T>
 
 1014    for(std::size_t i = 0; i < sizes[dim] + 1; ++i)
 
 1015      for_each_vertex_rec(f, base + multipliers[dim] * 2 * i, dim - 1);
 
 1017    for(std::size_t i = 0; i < sizes[0] + 1; ++i)
 
 1021template <
typename T>
 
 1023  int max_dim = multipliers.size()-1;
 
 1024  for (
int dim = max_dim; dim >= 0; --dim)
 
 1025    propagate_from_vertices_rec(dim, max_dim, 0);
 
 1028template <
typename T>
 
 1030  if (special_dim == current_dim) {
 
 1031    propagate_from_vertices_rec(special_dim, current_dim - 1, base);
 
 1034  if (current_dim < 0) {
 
 1035    std::size_t step = multipliers[special_dim];
 
 1036    for(std::size_t i = 0; i < sizes[special_dim]; ++i) {
 
 1037      std::size_t ref = base + step * 2 * i;
 
 1038      data[ref + step] = std::max(data[ref], data[ref + 2 * step]);
 
 1042  if (current_dim < special_dim)
 
 1043    for(std::size_t i = 0; i < sizes[current_dim] + 1; ++i)
 
 1044      propagate_from_vertices_rec(special_dim, current_dim - 1, base + multipliers[current_dim] * 2 * i);
 
 1046    for(std::size_t i = 0; i < 2 * sizes[current_dim] + 1; ++i)
 
 1047      propagate_from_vertices_rec(special_dim, current_dim - 1, base + multipliers[current_dim] * i);
 
 1050template <
typename T>
 
 1051bool compareFirstElementsOfTuples(
const std::pair<std::pair<T, std::size_t>, 
char>& first,
 
 1052                                  const std::pair<std::pair<T, std::size_t>, 
char>& second) {
 
 1053  if (first.first.first < second.first.first) {
 
 1056    if (first.first.first > second.first.first) {
 
 1060    return first.second < second.second;
 
 1066namespace Cubical_complex = cubical_complex;
 
Iterator through top dimensional cells of the complex. The cells appear in order they are stored in t...
Definition: Bitmap_cubical_complex_base.h:315
 
Range corresponding to Top_dimensional_cells_iterator.
Definition: Bitmap_cubical_complex_base.h:410
 
Cubical complex represented as a bitmap, class with basic implementation.
Definition: Bitmap_cubical_complex_base.h:57
 
std::vector< std::size_t >::const_iterator Coboundary_iterator
Definition: Bitmap_cubical_complex_base.h:302
 
Bitmap_cubical_complex_base()
Definition: Bitmap_cubical_complex_base.h:64
 
void put_data_to_bins(std::size_t number_of_bins)
Definition: Bitmap_cubical_complex_base.h:611
 
void impose_lower_star_filtration()
Definition: Bitmap_cubical_complex_base.h:965
 
boost::counting_iterator< std::size_t > All_cells_iterator
Iterator through all cells in the complex (in order they appear in the structure – i....
Definition: Bitmap_cubical_complex_base.h:267
 
std::size_t size() const
Definition: Bitmap_cubical_complex_base.h:232
 
boost::iterator_range< All_cells_iterator > All_cells_range
Range corresponding to All_cells_iterator.
Definition: Bitmap_cubical_complex_base.h:282
 
virtual std::vector< std::size_t > get_coboundary_of_a_cell(std::size_t cell) const
Definition: Bitmap_cubical_complex_base.h:888
 
unsigned get_dimension_of_a_cell(std::size_t cell) const
Definition: Bitmap_cubical_complex_base.h:917
 
unsigned dimension() const
Definition: Bitmap_cubical_complex_base.h:227
 
Top_dimensional_cells_iterator top_dimensional_cells_iterator_begin()
Definition: Bitmap_cubical_complex_base.h:390
 
Top_dimensional_cells_range top_dimensional_cells_range()
Definition: Bitmap_cubical_complex_base.h:423
 
virtual std::vector< std::size_t > get_boundary_of_a_cell(std::size_t cell) const
Definition: Bitmap_cubical_complex_base.h:850
 
Coboundary_range coboundary_range(std::size_t sh)
Definition: Bitmap_cubical_complex_base.h:309
 
All_cells_range all_cells_range() const
Definition: Bitmap_cubical_complex_base.h:285
 
std::pair< T, T > min_max_filtration()
Definition: Bitmap_cubical_complex_base.h:646
 
Top_dimensional_cells_iterator top_dimensional_cells_iterator_end()
Definition: Bitmap_cubical_complex_base.h:398
 
std::vector< std::size_t >::const_iterator Boundary_iterator
Definition: Bitmap_cubical_complex_base.h:290
 
size_t get_top_dimensional_coface_of_a_cell(size_t splx)
Definition: Bitmap_cubical_complex_base.h:715
 
All_cells_iterator all_cells_iterator_end() const
Definition: Bitmap_cubical_complex_base.h:277
 
T & get_cell_data(std::size_t cell)
Definition: Bitmap_cubical_complex_base.h:960
 
void impose_lower_star_filtration_from_vertices()
Definition: Bitmap_cubical_complex_base.h:1022
 
Boundary_range boundary_range(std::size_t sh)
Definition: Bitmap_cubical_complex_base.h:297
 
virtual int compute_incidence_between_cells(std::size_t coface, std::size_t face) const
Definition: Bitmap_cubical_complex_base.h:157
 
size_t get_vertex_of_a_cell(size_t splx)
Definition: Bitmap_cubical_complex_base.h:728
 
All_cells_iterator all_cells_iterator_begin() const
Definition: Bitmap_cubical_complex_base.h:272
 
virtual ~Bitmap_cubical_complex_base()
Definition: Bitmap_cubical_complex_base.h:88
 
Gudhi namespace.
Definition: SimplicialComplexForAlpha.h:14