summaryrefslogtreecommitdiff
path: root/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h
diff options
context:
space:
mode:
authorpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-12-11 10:11:32 +0000
committerpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-12-11 10:11:32 +0000
commitd9f8f2d006c1c57c05eeb6eddbc625e44ebd8831 (patch)
tree09ca635b542f29a5475b4a0eb9442113f059a549 /src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h
parent39ffc7af64543f0b2ce17487771afbd010a97349 (diff)
Adding corecntions suggested by the Editorial Board to the Bitmap_cubical_complex class.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/bitmap@942 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 81338409d0c6dc3435474f08f499dd5b72812ad6
Diffstat (limited to 'src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h')
-rw-r--r--src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h
index 2c2bd481..4e63b9c3 100644
--- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h
+++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h
@@ -30,7 +30,7 @@
#include <algorithm>
#include <iterator>
#include <limits>
-#include "counter.h"
+#include "Bitmap_cubical_complex/counter.h"
using namespace std;
@@ -182,11 +182,9 @@ public:
public:
Top_dimensional_cells_iterator( Bitmap_cubical_complex_base& b ):b(b)
{
- for ( size_t i = 0 ; i != b.dimension() ; ++i )
- {
- this->counter.push_back(0);
- }
- }
+ this->counter = std::vector<size_t>(b.dimension());
+ std::fill( this->counter.begin() , this->counter.end() , 0 );
+ }
Top_dimensional_cells_iterator operator++()
{
//first find first element of the counter that can be increased:
@@ -264,7 +262,7 @@ public:
}
friend class Bitmap_cubical_complex_base;
protected:
- std::vector< unsigned > counter;
+ std::vector< size_t > counter;
Bitmap_cubical_complex_base& b;
};
Top_dimensional_cells_iterator top_dimensional_cells_begin()
@@ -478,12 +476,16 @@ std::vector< size_t > Bitmap_cubical_complex_base<T>::get_boundary_of_a_cell( si
getchar();
}
- std::vector< size_t > boundary_elements;
+ std::vector< size_t > boundary_elements( 2*dimensions_in_which_cell_has_nonzero_length.size() );
if ( dimensions_in_which_cell_has_nonzero_length.size() == 0 )return boundary_elements;
for ( size_t i = 0 ; i != dimensions_in_which_cell_has_nonzero_length.size() ; ++i )
{
- boundary_elements.push_back( cell - multipliers[ dimensions_in_which_cell_has_nonzero_length[i] ] );
- boundary_elements.push_back( cell + multipliers[ dimensions_in_which_cell_has_nonzero_length[i] ] );
+ //boundary_elements.push_back( cell - multipliers[ dimensions_in_which_cell_has_nonzero_length[i] ] );
+ //boundary_elements.push_back( cell + multipliers[ dimensions_in_which_cell_has_nonzero_length[i] ] );
+ boundary_elements[2*i] = cell - multipliers[ dimensions_in_which_cell_has_nonzero_length[i] ];
+ boundary_elements[2*i+1] = cell + multipliers[ dimensions_in_which_cell_has_nonzero_length[i] ];
+
+
if (bdg) cerr << "multipliers[dimensions_in_which_cell_has_nonzero_length[i]] : "
<< multipliers[dimensions_in_which_cell_has_nonzero_length[i]] << endl;