Loading [MathJax]/extensions/TeX/AMSsymbols.js
All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Modules Pages
Bitmap_cubical_complex_base.h
1 /* This file is part of the Gudhi Library. The Gudhi library
2  * (Geometric Understanding in Higher Dimensions) is a generic C++
3  * library for computational topology.
4  *
5  * Author(s): Pawel Dlotko
6  *
7  * Copyright (C) 2015 INRIA Sophia-Saclay (France)
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef BITMAP_CUBICAL_COMPLEX_BASE_H_
24 #define BITMAP_CUBICAL_COMPLEX_BASE_H_
25 
26 #include <gudhi/Bitmap_cubical_complex/counter.h>
27 
28 #include <iostream>
29 #include <vector>
30 #include <string>
31 #include <fstream>
32 #include <algorithm>
33 #include <iterator>
34 #include <limits>
35 #include <utility> // for pair<>
36 
37 namespace Gudhi {
38 
39 namespace cubical_complex {
40 
60 template <typename T>
62  public:
63  typedef T filtration_type;
64 
69  total_number_of_cells(0) { }
76  Bitmap_cubical_complex_base(const std::vector<unsigned>& sizes);
83  Bitmap_cubical_complex_base(const char* perseus_style_file);
88  Bitmap_cubical_complex_base(const std::vector<unsigned>& dimensions, const std::vector<T>& top_dimensional_cells);
89 
94 
104  virtual inline std::vector< size_t > get_boundary_of_a_cell(size_t cell)const;
116  virtual inline std::vector< size_t > get_coboundary_of_a_cell(size_t cell)const;
121  inline unsigned get_dimension_of_a_cell(size_t cell)const;
128  inline T& get_cell_data(size_t cell);
129 
130 
139  void impose_lower_star_filtration(); // assume that top dimensional cells are already set.
140 
144  inline unsigned dimension()const {
145  return sizes.size();
146  }
147 
151  inline unsigned size()const {
152  return this->data.size();
153  }
154 
159  template <typename K>
160  friend std::ostream& operator<<(std::ostream & os, const Bitmap_cubical_complex_base<K>& b);
161 
170  void put_data_to_bins(size_t number_of_bins);
171 
182  void put_data_to_bins(T diameter_of_bin);
183 
187  std::pair< T, T > min_max_filtration();
188 
189  // ITERATORS
190 
195  class All_cells_iterator : std::iterator< std::input_iterator_tag, T > {
196  public:
198  this->counter = 0;
199  }
200 
201  All_cells_iterator operator++() {
202  // first find first element of the counter that can be increased:
203  ++this->counter;
204  return *this;
205  }
206 
207  All_cells_iterator operator++(int) {
208  All_cells_iterator result = *this;
209  ++(*this);
210  return result;
211  }
212 
213  All_cells_iterator& operator=(const All_cells_iterator& rhs) {
214  this->counter = rhs.counter;
215  return *this;
216  }
217 
218  bool operator==(const All_cells_iterator& rhs)const {
219  if (this->counter != rhs.counter)return false;
220  return true;
221  }
222 
223  bool operator!=(const All_cells_iterator& rhs)const {
224  return !(*this == rhs);
225  }
226 
227  /*
228  * The operator * returns position of a cube in the structure of cubical complex. This position can be then used as
229  * an argument of the following functions:
230  * get_boundary_of_a_cell, get_coboundary_of_a_cell, get_dimension_of_a_cell to get information about the cell
231  * boundary and coboundary and dimension
232  * and in function get_cell_data to get a filtration of a cell.
233  */
234  size_t operator*() {
235  return this->counter;
236  }
237  friend class Bitmap_cubical_complex_base;
238  protected:
239  size_t counter;
240  };
241 
247  return a;
248  }
249 
255  a.counter = this->data.size();
256  return a;
257  }
258 
263  public:
265 
266  All_cells_iterator begin() {
267  return b->all_cells_iterator_begin();
268  }
269 
270  All_cells_iterator end() {
271  return b->all_cells_iterator_end();
272  }
273  private:
275  };
276 
277  All_cells_range all_cells_range() {
278  return All_cells_range(this);
279  }
280 
281 
285  typedef typename std::vector< size_t >::const_iterator Boundary_iterator;
286  typedef typename std::vector< size_t > Boundary_range;
287 
292  Boundary_range boundary_range(size_t sh) {
293  return this->get_boundary_of_a_cell(sh);
294  }
295 
299  typedef typename std::vector< size_t >::const_iterator Coboundary_iterator;
300  typedef typename std::vector< size_t > Coboundary_range;
301 
306  Coboundary_range coboundary_range(size_t sh) {
307  return this->get_coboundary_of_a_cell(sh);
308  }
309 
314  class Top_dimensional_cells_iterator : std::iterator< std::input_iterator_tag, T > {
315  public:
317  this->counter = std::vector<size_t>(b.dimension());
318  // std::fill( this->counter.begin() , this->counter.end() , 0 );
319  }
320 
321  Top_dimensional_cells_iterator operator++() {
322  // first find first element of the counter that can be increased:
323  size_t dim = 0;
324  while ((dim != this->b.dimension()) && (this->counter[dim] == this->b.sizes[dim] - 1))++dim;
325 
326  if (dim != this->b.dimension()) {
327  ++this->counter[dim];
328  for (size_t i = 0; i != dim; ++i) {
329  this->counter[i] = 0;
330  }
331  } else {
332  ++this->counter[0];
333  }
334  return *this;
335  }
336 
337  Top_dimensional_cells_iterator operator++(int) {
338  Top_dimensional_cells_iterator result = *this;
339  ++(*this);
340  return result;
341  }
342 
344  this->counter = rhs.counter;
345  this->b = rhs.b;
346  return *this;
347  }
348 
349  bool operator==(const Top_dimensional_cells_iterator& rhs)const {
350  if (&this->b != &rhs.b)return false;
351  if (this->counter.size() != rhs.counter.size())return false;
352  for (size_t i = 0; i != this->counter.size(); ++i) {
353  if (this->counter[i] != rhs.counter[i])return false;
354  }
355  return true;
356  }
357 
358  bool operator!=(const Top_dimensional_cells_iterator& rhs)const {
359  return !(*this == rhs);
360  }
361 
362  /*
363  * The operator * returns position of a cube in the structure of cubical complex. This position can be then used as
364  * an argument of the following functions:
365  * get_boundary_of_a_cell, get_coboundary_of_a_cell, get_dimension_of_a_cell to get information about the cell
366  * boundary and coboundary and dimension
367  * and in function get_cell_data to get a filtration of a cell.
368  */
369  size_t operator*() {
370  return this->compute_index_in_bitmap();
371  }
372 
373  size_t compute_index_in_bitmap()const {
374  size_t index = 0;
375  for (size_t i = 0; i != this->counter.size(); ++i) {
376  index += (2 * this->counter[i] + 1) * this->b.multipliers[i];
377  }
378  return index;
379  }
380 
381  void print_counter()const {
382  for (size_t i = 0; i != this->counter.size(); ++i) {
383  std::cout << this->counter[i] << " ";
384  }
385  }
386  friend class Bitmap_cubical_complex_base;
387  protected:
388  std::vector< size_t > counter;
390  };
391 
397  return a;
398  }
399 
405  for (size_t i = 0; i != this->dimension(); ++i) {
406  a.counter[i] = this->sizes[i] - 1;
407  }
408  a.counter[0]++;
409  return a;
410  }
411 
416  public:
418 
421  }
422 
425  }
426  private:
428  };
429 
430  Top_dimensional_cells_range top_dimensional_cells_range() {
431  return Top_dimensional_cells_range(this);
432  }
433 
434 
435  //****************************************************************************************************************//
436  //****************************************************************************************************************//
437  //****************************************************************************************************************//
438  //****************************************************************************************************************//
439 
440  inline size_t number_cells()const {
441  return this->total_number_of_cells;
442  }
443 
444  //****************************************************************************************************************//
445  //****************************************************************************************************************//
446  //****************************************************************************************************************//
447  //****************************************************************************************************************//
448 
449  protected:
450  std::vector<unsigned> sizes;
451  std::vector<unsigned> multipliers;
452  std::vector<T> data;
453  size_t total_number_of_cells;
454 
455  void set_up_containers(const std::vector<unsigned>& sizes) {
456  unsigned multiplier = 1;
457  for (size_t i = 0; i != sizes.size(); ++i) {
458  this->sizes.push_back(sizes[i]);
459  this->multipliers.push_back(multiplier);
460  multiplier *= 2 * sizes[i] + 1;
461  }
462  this->data = std::vector<T>(multiplier, std::numeric_limits<T>::max());
463  this->total_number_of_cells = multiplier;
464  }
465 
466  size_t compute_position_in_bitmap(const std::vector< unsigned >& counter) {
467  size_t position = 0;
468  for (size_t i = 0; i != this->multipliers.size(); ++i) {
469  position += this->multipliers[i] * counter[i];
470  }
471  return position;
472  }
473 
474  std::vector<unsigned> compute_counter_for_given_cell(size_t cell)const {
475  std::vector<unsigned> counter;
476  counter.reserve(this->sizes.size());
477  for (size_t dim = this->sizes.size(); dim != 0; --dim) {
478  counter.push_back(cell / this->multipliers[dim - 1]);
479  cell = cell % this->multipliers[dim - 1];
480  }
481  std::reverse(counter.begin(), counter.end());
482  return counter;
483  }
484  void read_perseus_style_file(const char* perseus_style_file);
485  void setup_bitmap_based_on_top_dimensional_cells_list(const std::vector<unsigned>& sizes_in_following_directions,
486  const std::vector<T>& top_dimensional_cells);
487  Bitmap_cubical_complex_base(const char* perseus_style_file, std::vector<bool> directions);
488  Bitmap_cubical_complex_base(const std::vector<unsigned>& sizes, std::vector<bool> directions);
489  Bitmap_cubical_complex_base(const std::vector<unsigned>& dimensions,
490  const std::vector<T>& top_dimensional_cells,
491  std::vector<bool> directions);
492 };
493 
494 template <typename T>
496  bool bdg = false;
497 
498  std::pair< T, T > min_max = this->min_max_filtration();
499  T dx = (min_max.second - min_max.first) / (T) number_of_bins;
500 
501  // now put the data into the appropriate bins:
502  for (size_t i = 0; i != this->data.size(); ++i) {
503  if (bdg) {
504  std::cerr << "Before binning : " << this->data[i] << std::endl;
505  }
506  this->data[i] = min_max.first + dx * (this->data[i] - min_max.first) / number_of_bins;
507  if (bdg) {
508  std::cerr << "After binning : " << this->data[i] << std::endl;
509  getchar();
510  }
511  }
512 }
513 
514 template <typename T>
516  bool bdg = false;
517  std::pair< T, T > min_max = this->min_max_filtration();
518 
519  size_t number_of_bins = (min_max.second - min_max.first) / diameter_of_bin;
520  // now put the data into the appropriate bins:
521  for (size_t i = 0; i != this->data.size(); ++i) {
522  if (bdg) {
523  std::cerr << "Before binning : " << this->data[i] << std::endl;
524  }
525  this->data[i] = min_max.first + diameter_of_bin * (this->data[i] - min_max.first) / number_of_bins;
526  if (bdg) {
527  std::cerr << "After binning : " << this->data[i] << std::endl;
528  getchar();
529  }
530  }
531 }
532 
533 template <typename T>
535  std::pair< T, T > min_max(std::numeric_limits<T>::max(), std::numeric_limits<T>::min());
536  for (size_t i = 0; i != this->data.size(); ++i) {
537  if (this->data[i] < min_max.first)min_max.first = this->data[i];
538  if (this->data[i] > min_max.second)min_max.second = this->data[i];
539  }
540  return min_max;
541 }
542 
543 template <typename K>
544 std::ostream& operator<<(std::ostream & out, const Bitmap_cubical_complex_base<K>& b) {
546  it = b.all_cells_const_begin(); it != b.all_cells_const_end(); ++it) {
547  out << *it << " ";
548  }
549  return out;
550 }
551 
552 template <typename T>
554 (const std::vector<unsigned>& sizes) {
555  this->set_up_containers(sizes);
556 }
557 
558 template <typename T>
559 void Bitmap_cubical_complex_base<T>::setup_bitmap_based_on_top_dimensional_cells_list(const std::vector<unsigned>& sizes_in_following_directions,
560  const std::vector<T>& top_dimensional_cells) {
561  this->set_up_containers(sizes_in_following_directions);
562 
563  size_t number_of_top_dimensional_elements = 1;
564  for (size_t i = 0; i != sizes_in_following_directions.size(); ++i) {
565  number_of_top_dimensional_elements *= sizes_in_following_directions[i];
566  }
567  if (number_of_top_dimensional_elements != top_dimensional_cells.size()) {
568  std::cerr << "Error in constructor Bitmap_cubical_complex_base ( std::vector<size_t> sizes_in_following_directions"
569  << ", std::vector<T> top_dimensional_cells ). Number of top dimensional elements that follow from "
570  << "sizes_in_following_directions vector is different than the size of top_dimensional_cells vector."
571  << std::endl;
572  throw("Error in constructor Bitmap_cubical_complex_base( std::vector<size_t> sizes_in_following_directions,"
573  "std::vector<T> top_dimensional_cells ). Number of top dimensional elements that follow from "
574  "sizes_in_following_directions vector is different than the size of top_dimensional_cells vector.");
575  }
576 
578  size_t index = 0;
579  for (it = this->top_dimensional_cells_iterator_begin(); it != this->top_dimensional_cells_iterator_end(); ++it) {
580  this->get_cell_data(*it) = top_dimensional_cells[index];
581  ++index;
582  }
584 }
585 
586 template <typename T>
588 (const std::vector<unsigned>& sizes_in_following_directions, const std::vector<T>& top_dimensional_cells) {
589  this->setup_bitmap_based_on_top_dimensional_cells_list(sizes_in_following_directions, top_dimensional_cells);
590 }
591 
592 template <typename T>
593 void Bitmap_cubical_complex_base<T>::read_perseus_style_file(const char* perseus_style_file) {
594  bool dbg = false;
595  std::ifstream inFiltration;
596  inFiltration.open(perseus_style_file);
597  unsigned dimensionOfData;
598  inFiltration >> dimensionOfData;
599 
600  if (dbg) {
601  std::cerr << "dimensionOfData : " << dimensionOfData << std::endl;
602  getchar();
603  }
604 
605  std::vector<unsigned> sizes;
606  sizes.reserve(dimensionOfData);
607  for (size_t i = 0; i != dimensionOfData; ++i) {
608  unsigned size_in_this_dimension;
609  inFiltration >> size_in_this_dimension;
610  sizes.push_back(size_in_this_dimension);
611  if (dbg) {
612  std::cerr << "size_in_this_dimension : " << size_in_this_dimension << std::endl;
613  }
614  }
615  this->set_up_containers(sizes);
616 
619 
620  while (!inFiltration.eof()) {
621  T filtrationLevel;
622  inFiltration >> filtrationLevel;
623  if (dbg) {
624  std::cerr << "Cell of an index : "
625  << it.compute_index_in_bitmap()
626  << " and dimension: "
627  << this->get_dimension_of_a_cell(it.compute_index_in_bitmap())
628  << " get the value : " << filtrationLevel << std::endl;
629  }
630  this->get_cell_data(*it) = filtrationLevel;
631  ++it;
632  }
633  inFiltration.close();
635 }
636 
637 template <typename T>
639  std::vector<bool> directions) {
640  // this constructor is here just for compatibility with a class that creates cubical complexes with periodic boundary
641  // conditions.
642  // It ignores the last parameter of the function.
643  this->read_perseus_style_file(perseus_style_file);
644 }
645 
646 template <typename T>
647 Bitmap_cubical_complex_base<T>::Bitmap_cubical_complex_base(const std::vector<unsigned>& sizes,
648  std::vector<bool> directions) {
649  // this constructor is here just for compatibility with a class that creates cubical complexes with periodic boundary
650  // conditions.
651  // It ignores the last parameter of the function.
652  this->set_up_containers(sizes);
653 }
654 
655 template <typename T>
656 Bitmap_cubical_complex_base<T>::Bitmap_cubical_complex_base(const std::vector<unsigned>& dimensions,
657  const std::vector<T>& top_dimensional_cells,
658  std::vector<bool> directions) {
659  // this constructor is here just for compatibility with a class that creates cubical complexes with periodic boundary
660  // conditions.
661  // It ignores the last parameter of the function.
662  this->setup_bitmap_based_on_top_dimensional_cells_list(dimensions, top_dimensional_cells);
663 }
664 
665 template <typename T>
667  this->read_perseus_style_file(perseus_style_file);
668 }
669 
670 template <typename T>
671 std::vector< size_t > Bitmap_cubical_complex_base<T>::get_boundary_of_a_cell(size_t cell)const {
672  std::vector< size_t > boundary_elements;
673 
674  // Speed traded of for memory. Check if it is better in practice.
675  boundary_elements.reserve(this->dimension()*2);
676 
677  size_t cell1 = cell;
678  for (size_t i = this->multipliers.size(); i != 0; --i) {
679  unsigned position = cell1 / this->multipliers[i - 1];
680  if (position % 2 == 1) {
681  boundary_elements.push_back(cell - this->multipliers[ i - 1 ]);
682  boundary_elements.push_back(cell + this->multipliers[ i - 1 ]);
683  }
684  cell1 = cell1 % this->multipliers[i - 1];
685  }
686  return boundary_elements;
687 }
688 
689 template <typename T>
690 std::vector< size_t > Bitmap_cubical_complex_base<T>::get_coboundary_of_a_cell(size_t cell)const {
691  std::vector<unsigned> counter = this->compute_counter_for_given_cell(cell);
692  std::vector< size_t > coboundary_elements;
693  size_t cell1 = cell;
694  for (size_t i = this->multipliers.size(); i != 0; --i) {
695  unsigned position = cell1 / this->multipliers[i - 1];
696  if (position % 2 == 0) {
697  if ((cell > this->multipliers[i - 1]) && (counter[i - 1] != 0)) {
698  coboundary_elements.push_back(cell - this->multipliers[i - 1]);
699  }
700  if (
701  (cell + this->multipliers[i - 1] < this->data.size()) && (counter[i - 1] != 2 * this->sizes[i - 1])) {
702  coboundary_elements.push_back(cell + this->multipliers[i - 1]);
703  }
704  }
705  cell1 = cell1 % this->multipliers[i - 1];
706  }
707  return coboundary_elements;
708 }
709 
710 template <typename T>
712  bool dbg = false;
713  if (dbg) std::cerr << "\n\n\n Computing position o a cell of an index : " << cell << std::endl;
714  unsigned dimension = 0;
715  for (size_t i = this->multipliers.size(); i != 0; --i) {
716  unsigned position = cell / this->multipliers[i - 1];
717 
718  if (dbg) {
719  std::cerr << "i-1 :" << i - 1 << std::endl;
720  std::cerr << "cell : " << cell << std::endl;
721  std::cerr << "position : " << position << std::endl;
722  std::cerr << "multipliers[" << i - 1 << "] = " << this->multipliers[i - 1] << std::endl;
723  getchar();
724  }
725 
726  if (position % 2 == 1) {
727  if (dbg) std::cerr << "Nonzero length in this direction \n";
728  dimension++;
729  }
730  cell = cell % this->multipliers[i - 1];
731  }
732  return dimension;
733 }
734 
735 template <typename T>
737  return this->data[cell];
738 }
739 
740 template <typename T>
742  bool dbg = false;
743 
744  // this vector will be used to check which elements have already been taken care of in imposing lower star filtration
745  std::vector<bool> is_this_cell_considered(this->data.size(), false);
746 
747  size_t size_to_reserve = 1;
748  for (size_t i = 0; i != this->multipliers.size(); ++i) {
749  size_to_reserve *= (size_t) ((this->multipliers[i] - 1) / 2);
750  }
751 
752  std::vector<size_t> indices_to_consider;
753  indices_to_consider.reserve(size_to_reserve);
754  // we assume here that we already have a filtration on the top dimensional cells and
755  // we have to extend it to lower ones.
757  for (it = this->top_dimensional_cells_iterator_begin(); it != this->top_dimensional_cells_iterator_end(); ++it) {
758  indices_to_consider.push_back(it.compute_index_in_bitmap());
759  }
760 
761  while (indices_to_consider.size()) {
762  if (dbg) {
763  std::cerr << "indices_to_consider in this iteration \n";
764  for (size_t i = 0; i != indices_to_consider.size(); ++i) {
765  std::cout << indices_to_consider[i] << " ";
766  }
767  getchar();
768  }
769  std::vector<size_t> new_indices_to_consider;
770  for (size_t i = 0; i != indices_to_consider.size(); ++i) {
771  std::vector<size_t> bd = this->get_boundary_of_a_cell(indices_to_consider[i]);
772  for (size_t boundaryIt = 0; boundaryIt != bd.size(); ++boundaryIt) {
773  if (dbg) {
774  std::cerr << "filtration of a cell : " << bd[boundaryIt] << " is : " << this->data[ bd[boundaryIt] ]
775  << " while of a cell: " << indices_to_consider[i] << " is: " << this->data[ indices_to_consider[i] ]
776  << std::endl;
777  getchar();
778  }
779  if (this->data[ bd[boundaryIt] ] > this->data[ indices_to_consider[i] ]) {
780  this->data[ bd[boundaryIt] ] = this->data[ indices_to_consider[i] ];
781  if (dbg) {
782  std::cerr << "Setting the value of a cell : " << bd[boundaryIt] << " to : "
783  << this->data[ indices_to_consider[i] ] << std::endl;
784  getchar();
785  }
786  }
787  if (is_this_cell_considered[ bd[boundaryIt] ] == false) {
788  new_indices_to_consider.push_back(bd[boundaryIt]);
789  is_this_cell_considered[ bd[boundaryIt] ] = true;
790  }
791  }
792  }
793  indices_to_consider.swap(new_indices_to_consider);
794  }
795 }
796 
797 template <typename T>
798 bool compareFirstElementsOfTuples(const std::pair< std::pair< T, size_t >, char >& first,
799  const std::pair< std::pair< T, size_t >, char >& second) {
800  if (first.first.first < second.first.first) {
801  return true;
802  } else {
803  if (first.first.first > second.first.first) {
804  return false;
805  }
806  // in this case first.first.first == second.first.first, so we need to compare dimensions
807  return first.second < second.second;
808  }
809 }
810 
811 } // namespace cubical_complex
812 
813 namespace Cubical_complex = cubical_complex;
814 
815 } // namespace Gudhi
816 
817 #endif // BITMAP_CUBICAL_COMPLEX_BASE_H_
void impose_lower_star_filtration()
Definition: Bitmap_cubical_complex_base.h:741
virtual std::vector< size_t > get_boundary_of_a_cell(size_t cell) const
Definition: Bitmap_cubical_complex_base.h:671
Cubical complex represented as a bitmap, class with basic implementation.
Definition: Bitmap_cubical_complex_base.h:61
virtual ~Bitmap_cubical_complex_base()
Definition: Bitmap_cubical_complex_base.h:93
All_cells_iterator all_cells_iterator_begin()
Definition: Bitmap_cubical_complex_base.h:245
std::vector< size_t >::const_iterator Boundary_iterator
Definition: Bitmap_cubical_complex_base.h:285
Definition: SimplicialComplexForAlpha.h:26
This is an implementation of a counter being a vector of integers.
Definition: counter.h:43
Bitmap_cubical_complex_base()
Definition: Bitmap_cubical_complex_base.h:68
unsigned size() const
Definition: Bitmap_cubical_complex_base.h:151
unsigned get_dimension_of_a_cell(size_t cell) const
Definition: Bitmap_cubical_complex_base.h:711
Top_dimensional_cells_iterator top_dimensional_cells_iterator_end()
Definition: Bitmap_cubical_complex_base.h:403
virtual std::vector< size_t > get_coboundary_of_a_cell(size_t cell) const
Definition: Bitmap_cubical_complex_base.h:690
Top_dimensional_cells_iterator top_dimensional_cells_iterator_begin()
Definition: Bitmap_cubical_complex_base.h:395
void put_data_to_bins(size_t number_of_bins)
Definition: Bitmap_cubical_complex_base.h:495
Top_dimensional_cells_iterator_range class provides ranges for Top_dimensional_cells_iterator_range.
Definition: Bitmap_cubical_complex_base.h:415
Coboundary_range coboundary_range(size_t sh)
Definition: Bitmap_cubical_complex_base.h:306
Boundary_range boundary_range(size_t sh)
Definition: Bitmap_cubical_complex_base.h:292
All_cells_iterator all_cells_iterator_end()
Definition: Bitmap_cubical_complex_base.h:253
Iterator through all cells in the complex (in order they appear in the structure – i...
Definition: Bitmap_cubical_complex_base.h:195
std::vector< size_t >::const_iterator Coboundary_iterator
Definition: Bitmap_cubical_complex_base.h:299
std::pair< T, T > min_max_filtration()
Definition: Bitmap_cubical_complex_base.h:534
T & get_cell_data(size_t cell)
Definition: Bitmap_cubical_complex_base.h:736
All_cells_range class provides ranges for All_cells_iterator.
Definition: Bitmap_cubical_complex_base.h:262
unsigned dimension() const
Definition: Bitmap_cubical_complex_base.h:144
Iterator through top dimensional cells of the complex. The cells appear in order they are stored in t...
Definition: Bitmap_cubical_complex_base.h:314
GUDHI  Version 2.0.1  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding. Generated on Mon Oct 2 2017 10:20:49 for GUDHI by doxygen 1.8.11