diff options
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.h | 17 |
1 files changed, 9 insertions, 8 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 3aa64fbf..1f869e80 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 @@ -128,10 +128,11 @@ class Bitmap_cubical_complex_base { * Note that first parameter is a cube of dimension n, * and the second parameter is an adjusted cube in dimension n-1. * Given \f$A = [b_1,e_1] \times \ldots \ [b_{j-1},e_{j-1}] \times [b_{j},e_{j}] \times [b_{j+1},e_{j+1}] \times \ldots \times [b_{n},e_{n}] \f$ - * and \f$B = [b_1,e_1] \times \ldots \ [b_{j-1},e_{j-1}] \times [a,a] \times [b_{j+1},e_{j+1}] \times \ldots \times [b_{n},e_{n}] c + * such that \f$ b_{j} \neq e_{j} \f$ + * and \f$B = [b_1,e_1] \times \ldots \ [b_{j-1},e_{j-1}] \times [a,a] \times [b_{j+1},e_{j+1}] \times \ldots \times [b_{n},e_{n}] \f$ * where \f$ a = b_{j}\f$ or \f$ a = e_{j}\f$, the incidence between \f$A\f$ and \f$B\f$ * computed by this procedure is given by formula: - * \f$ c\ (-1)^{\sum_{i=1}^{j-1}} dim [b_{i},e_{i}] \f$ + * \f$ c\ (-1)^{\sum_{i=1}^{j-1} dim [b_{i},e_{i}]} \f$ * Where \f$ dim [b_{i},e_{i}] = 0 \f$ if \f$ b_{i}=e_{i} \f$ and 1 in other case. * c is -1 if \f$ a = b_{j}\f$ and 1 if \f$ a = e_{j}\f$. * @exception std::logic_error In case when the cube \f$B\f$ is not n-1 @@ -140,11 +141,11 @@ class Bitmap_cubical_complex_base { virtual int compute_incidence_between_cells( size_t coface , size_t face )const { - //first get the counters for coBoundary and boundary: + //first get the counters for coBoucofacendary and face: std::vector<unsigned> coface_counter = this->compute_counter_for_given_cell( coface ); std::vector<unsigned> face_counter = this->compute_counter_for_given_cell( face ); - //cbd_counter and bd_counter should agree at all positions except from one: + //coface_counter and face_counter should agree at all positions except from one: int number_of_position_in_which_counters_do_not_agree = -1; size_t number_of_full_faces_that_comes_before = 0; for ( size_t i = 0 ; i != coface_counter.size() ; ++i ) @@ -157,16 +158,16 @@ class Bitmap_cubical_complex_base { { if ( number_of_position_in_which_counters_do_not_agree != -1 ) { - std::cout << "Cells given to compute_incidence_between_cells procedure do not form a pair of coboundary-boundary.\n"; - throw std::logic_error("Cells given to compute_incidence_between_cells procedure do not form a pair of coboundary-boundary."); + std::cout << "Cells given to compute_incidence_between_cells procedure do not form a pair of coface-face.\n"; + throw std::logic_error("Cells given to compute_incidence_between_cells procedure do not form a pair of coface-face."); } number_of_position_in_which_counters_do_not_agree = i; } - } + } int incidence = 1; if ( number_of_full_faces_that_comes_before%2 )incidence = -1; - //if the boundary cell is on the right from coboundary cell: + //if the face cell is on the right from coface cell: if ( coface_counter[number_of_position_in_which_counters_do_not_agree]+1 == face_counter[number_of_position_in_which_counters_do_not_agree] ) |