summaryrefslogtreecommitdiff
path: root/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h
diff options
context:
space:
mode:
authorpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-02-09 13:26:47 +0000
committerpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-02-09 13:26:47 +0000
commit84399987baac2817e58bf9f5e18ded6aa6893b0f (patch)
tree3a9c1f51a5ee1f4aa65e0b8061fc653ef7eb0bd9 /src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h
parent3be6acc35255b52a60a254fa101aec5b11173b6d (diff)
adding missing partsy
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/bitmap@1008 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: f6de1ee4317763b50233f9a7212bdbf6587ee686
Diffstat (limited to 'src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h')
-rw-r--r--src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h
index 63edcadd..82ea8672 100644
--- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h
+++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h
@@ -1,4 +1,4 @@
- /* This file is part of the Gudhi Library. The Gudhi library
+/* This file is part of the Gudhi Library. The Gudhi library
* (Geometric Understanding in Higher Dimensions) is a generic C++
* library for computational topology.
*
@@ -65,7 +65,8 @@ public:
**/
Bitmap_cubical_complex( const char* perseus_style_file ):
T(perseus_style_file),key_associated_to_simplex(this->total_number_of_cells+1)
- {
+ {
+ //clock_t begin = clock();
if ( globalDbg ){cerr << "Bitmap_cubical_complex( const char* perseus_style_file )\n";}
for ( size_t i = 0 ; i != this->total_number_of_cells ; ++i )
{
@@ -74,7 +75,8 @@ public:
//we initialize this only once, in each constructor, when the bitmap is constructed.
//If the user decide to change some elements of the bitmap, then this procedure need
//to be called again.
- this->initialize_simplex_associated_to_key();
+ this->initialize_simplex_associated_to_key();
+ //cerr << "Time of running Bitmap_cubical_complex( const char* perseus_style_file ) constructor : " << double(clock() - begin) / CLOCKS_PER_SEC << endl;
}
@@ -115,7 +117,8 @@ public:
//If the user decide to change some elements of the bitmap, then this procedure need
//to be called again.
this->initialize_simplex_associated_to_key();
- }
+ }
+
//*********************************************//
//Other 'easy' functions
@@ -328,6 +331,15 @@ public:
**/
Boundary_simplex_range boundary_simplex_range(Simplex_handle sh)
{
+ /*
+ std::vector< size_t > bdry = this->get_boundary_of_a_cell(sh);
+ Boundary_simplex_range result( bdry.size() );
+ for ( size_t i = 0 ; i != bdry.size() ; ++i )
+ {
+ result[i] = this->simplex_associated_to_key[ bdry[i] ];
+ }
+ return result;
+ */
return this->get_boundary_of_a_cell(sh);
}
@@ -500,7 +512,13 @@ void Bitmap_cubical_complex<T>::initialize_simplex_associated_to_key()
std::iota (std::begin(simplex_associated_to_key), std::end(simplex_associated_to_key), 0);
std::sort( simplex_associated_to_key.begin() ,
simplex_associated_to_key.end() ,
- is_before_in_filtration<T>(this) );
+ is_before_in_filtration<T>(this) );
+
+ //we still need to deal here with a key_associated_to_simplex:
+ for ( size_t i = 0 ; i != simplex_associated_to_key.size() ; ++i )
+ {
+ this->key_associated_to_simplex[ simplex_associated_to_key[i] ] = i;
+ }
}