summaryrefslogtreecommitdiff
path: root/src/Bitmap_cubical_complex
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-01-27 10:43:16 +0100
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-01-27 10:43:16 +0100
commitbf4b4eeda9762ed9e99c2b24f19331fa0111fcfe (patch)
tree03950723bd824ba3c69597e022500dfd5f37e914 /src/Bitmap_cubical_complex
parentc7b70317b643b2eb9c603602da9c979388829821 (diff)
Code review: Use std::clog instead of std::cout
Diffstat (limited to 'src/Bitmap_cubical_complex')
-rw-r--r--src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp2
-rw-r--r--src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h56
-rw-r--r--src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h36
-rw-r--r--src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h10
-rw-r--r--src/Bitmap_cubical_complex/test/Bitmap_test.cpp14
-rw-r--r--src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp4
-rw-r--r--src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp4
7 files changed, 63 insertions, 63 deletions
diff --git a/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp b/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp
index 46ea8f2e..e5512418 100644
--- a/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp
+++ b/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp
@@ -21,7 +21,7 @@
int main(int argc, char** argv) {
srand(time(0));
- std::cout
+ std::clog
<< "This program computes persistent homology, by using bitmap_cubical_complex class, of cubical "
<< "complexes. The first parameter of the program is the dimension D of the bitmap. The next D parameters are "
<< "number of top dimensional cubes in each dimension of the bitmap. The program will create random cubical "
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 2f95dff3..aa255ec2 100644
--- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h
+++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex.h
@@ -69,7 +69,7 @@ class Bitmap_cubical_complex : public T {
Bitmap_cubical_complex(const char* perseus_style_file)
: T(perseus_style_file), key_associated_to_simplex(this->total_number_of_cells + 1) {
if (globalDbg) {
- std::cout << "Bitmap_cubical_complex( const char* perseus_style_file )\n";
+ std::clog << "Bitmap_cubical_complex( const char* perseus_style_file )\n";
}
for (std::size_t i = 0; i != this->total_number_of_cells; ++i) {
this->key_associated_to_simplex[i] = i;
@@ -137,7 +137,7 @@ class Bitmap_cubical_complex : public T {
**/
static Simplex_handle null_simplex() {
if (globalDbg) {
- std::cout << "Simplex_handle null_simplex()\n";
+ std::clog << "Simplex_handle null_simplex()\n";
}
return std::numeric_limits<Simplex_handle>::max();
}
@@ -152,7 +152,7 @@ class Bitmap_cubical_complex : public T {
**/
inline unsigned dimension(Simplex_handle sh) const {
if (globalDbg) {
- std::cout << "unsigned dimension(const Simplex_handle& sh)\n";
+ std::clog << "unsigned dimension(const Simplex_handle& sh)\n";
}
if (sh != null_simplex()) return this->get_dimension_of_a_cell(sh);
return -1;
@@ -163,7 +163,7 @@ class Bitmap_cubical_complex : public T {
**/
Filtration_value filtration(Simplex_handle sh) {
if (globalDbg) {
- std::cout << "Filtration_value filtration(const Simplex_handle& sh)\n";
+ std::clog << "Filtration_value filtration(const Simplex_handle& sh)\n";
}
// Returns the filtration value of a simplex.
if (sh != null_simplex()) return this->data[sh];
@@ -175,7 +175,7 @@ class Bitmap_cubical_complex : public T {
**/
static Simplex_key null_key() {
if (globalDbg) {
- std::cout << "Simplex_key null_key()\n";
+ std::clog << "Simplex_key null_key()\n";
}
return std::numeric_limits<Simplex_handle>::max();
}
@@ -185,7 +185,7 @@ class Bitmap_cubical_complex : public T {
**/
Simplex_key key(Simplex_handle sh) const {
if (globalDbg) {
- std::cout << "Simplex_key key(const Simplex_handle& sh)\n";
+ std::clog << "Simplex_key key(const Simplex_handle& sh)\n";
}
if (sh != null_simplex()) {
return this->key_associated_to_simplex[sh];
@@ -198,7 +198,7 @@ class Bitmap_cubical_complex : public T {
**/
Simplex_handle simplex(Simplex_key key) {
if (globalDbg) {
- std::cout << "Simplex_handle simplex(Simplex_key key)\n";
+ std::clog << "Simplex_handle simplex(Simplex_key key)\n";
}
if (key != null_key()) {
return this->simplex_associated_to_key[key];
@@ -211,7 +211,7 @@ class Bitmap_cubical_complex : public T {
**/
void assign_key(Simplex_handle sh, Simplex_key key) {
if (globalDbg) {
- std::cout << "void assign_key(Simplex_handle& sh, Simplex_key key)\n";
+ std::clog << "void assign_key(Simplex_handle& sh, Simplex_key key)\n";
}
if (key == null_key()) return;
this->key_associated_to_simplex[sh] = key;
@@ -251,7 +251,7 @@ class Bitmap_cubical_complex : public T {
Filtration_simplex_iterator operator++() {
if (globalDbg) {
- std::cout << "Filtration_simplex_iterator operator++\n";
+ std::clog << "Filtration_simplex_iterator operator++\n";
}
++this->position;
return (*this);
@@ -265,7 +265,7 @@ class Bitmap_cubical_complex : public T {
Filtration_simplex_iterator& operator=(const Filtration_simplex_iterator& rhs) {
if (globalDbg) {
- std::cout << "Filtration_simplex_iterator operator =\n";
+ std::clog << "Filtration_simplex_iterator operator =\n";
}
this->b = rhs.b;
this->position = rhs.position;
@@ -274,21 +274,21 @@ class Bitmap_cubical_complex : public T {
bool operator==(const Filtration_simplex_iterator& rhs) const {
if (globalDbg) {
- std::cout << "bool operator == ( const Filtration_simplex_iterator& rhs )\n";
+ std::clog << "bool operator == ( const Filtration_simplex_iterator& rhs )\n";
}
return (this->position == rhs.position);
}
bool operator!=(const Filtration_simplex_iterator& rhs) const {
if (globalDbg) {
- std::cout << "bool operator != ( const Filtration_simplex_iterator& rhs )\n";
+ std::clog << "bool operator != ( const Filtration_simplex_iterator& rhs )\n";
}
return !(*this == rhs);
}
Simplex_handle operator*() {
if (globalDbg) {
- std::cout << "Simplex_handle operator*()\n";
+ std::clog << "Simplex_handle operator*()\n";
}
return this->b->simplex_associated_to_key[this->position];
}
@@ -314,14 +314,14 @@ class Bitmap_cubical_complex : public T {
Filtration_simplex_iterator begin() {
if (globalDbg) {
- std::cout << "Filtration_simplex_iterator begin() \n";
+ std::clog << "Filtration_simplex_iterator begin() \n";
}
return Filtration_simplex_iterator(this->b);
}
Filtration_simplex_iterator end() {
if (globalDbg) {
- std::cout << "Filtration_simplex_iterator end()\n";
+ std::clog << "Filtration_simplex_iterator end()\n";
}
Filtration_simplex_iterator it(this->b);
it.position = this->b->simplex_associated_to_key.size();
@@ -347,7 +347,7 @@ class Bitmap_cubical_complex : public T {
**/
Filtration_simplex_range filtration_simplex_range() {
if (globalDbg) {
- std::cout << "Filtration_simplex_range filtration_simplex_range()\n";
+ std::clog << "Filtration_simplex_range filtration_simplex_range()\n";
}
// Returns a range over the simplices of the complex in the order of the filtration
return Filtration_simplex_range(this);
@@ -370,8 +370,8 @@ class Bitmap_cubical_complex : public T {
std::pair<Simplex_handle, Simplex_handle> endpoints(Simplex_handle sh) {
std::vector<std::size_t> bdry = this->get_boundary_of_a_cell(sh);
if (globalDbg) {
- std::cout << "std::pair<Simplex_handle, Simplex_handle> endpoints( Simplex_handle sh )\n";
- std::cout << "bdry.size() : " << bdry.size() << "\n";
+ std::clog << "std::pair<Simplex_handle, Simplex_handle> endpoints( Simplex_handle sh )\n";
+ std::clog << "bdry.size() : " << bdry.size() << "\n";
}
// this method returns two first elements from the boundary of sh.
if (bdry.size() < 2)
@@ -392,7 +392,7 @@ class Bitmap_cubical_complex : public T {
public:
Skeleton_simplex_iterator(Bitmap_cubical_complex* b, std::size_t d) : b(b), dimension(d) {
if (globalDbg) {
- std::cout << "Skeleton_simplex_iterator ( Bitmap_cubical_complex* b , std::size_t d )\n";
+ std::clog << "Skeleton_simplex_iterator ( Bitmap_cubical_complex* b , std::size_t d )\n";
}
// find the position of the first simplex of a dimension d
this->position = 0;
@@ -406,7 +406,7 @@ class Bitmap_cubical_complex : public T {
Skeleton_simplex_iterator operator++() {
if (globalDbg) {
- std::cout << "Skeleton_simplex_iterator operator++()\n";
+ std::clog << "Skeleton_simplex_iterator operator++()\n";
}
// increment the position as long as you did not get to the next element of the dimension dimension.
++this->position;
@@ -425,7 +425,7 @@ class Bitmap_cubical_complex : public T {
Skeleton_simplex_iterator& operator=(const Skeleton_simplex_iterator& rhs) {
if (globalDbg) {
- std::cout << "Skeleton_simplex_iterator operator =\n";
+ std::clog << "Skeleton_simplex_iterator operator =\n";
}
this->b = rhs.b;
this->position = rhs.position;
@@ -435,21 +435,21 @@ class Bitmap_cubical_complex : public T {
bool operator==(const Skeleton_simplex_iterator& rhs) const {
if (globalDbg) {
- std::cout << "bool operator ==\n";
+ std::clog << "bool operator ==\n";
}
return (this->position == rhs.position);
}
bool operator!=(const Skeleton_simplex_iterator& rhs) const {
if (globalDbg) {
- std::cout << "bool operator != ( const Skeleton_simplex_iterator& rhs )\n";
+ std::clog << "bool operator != ( const Skeleton_simplex_iterator& rhs )\n";
}
return !(*this == rhs);
}
Simplex_handle operator*() {
if (globalDbg) {
- std::cout << "Simplex_handle operator*() \n";
+ std::clog << "Simplex_handle operator*() \n";
}
return this->position;
}
@@ -476,14 +476,14 @@ class Bitmap_cubical_complex : public T {
Skeleton_simplex_iterator begin() {
if (globalDbg) {
- std::cout << "Skeleton_simplex_iterator begin()\n";
+ std::clog << "Skeleton_simplex_iterator begin()\n";
}
return Skeleton_simplex_iterator(this->b, this->dimension);
}
Skeleton_simplex_iterator end() {
if (globalDbg) {
- std::cout << "Skeleton_simplex_iterator end()\n";
+ std::clog << "Skeleton_simplex_iterator end()\n";
}
Skeleton_simplex_iterator it(this->b, this->dimension);
it.position = this->b->data.size();
@@ -500,7 +500,7 @@ class Bitmap_cubical_complex : public T {
**/
Skeleton_simplex_range skeleton_simplex_range(unsigned dimension) {
if (globalDbg) {
- std::cout << "Skeleton_simplex_range skeleton_simplex_range( unsigned dimension )\n";
+ std::clog << "Skeleton_simplex_range skeleton_simplex_range( unsigned dimension )\n";
}
return Skeleton_simplex_range(this, dimension);
}
@@ -515,7 +515,7 @@ class Bitmap_cubical_complex : public T {
template <typename T>
void Bitmap_cubical_complex<T>::initialize_simplex_associated_to_key() {
if (globalDbg) {
- std::cout << "void Bitmap_cubical_complex<T>::initialize_elements_ordered_according_to_filtration() \n";
+ std::clog << "void Bitmap_cubical_complex<T>::initialize_elements_ordered_according_to_filtration() \n";
}
this->simplex_associated_to_key = std::vector<std::size_t>(this->data.size());
std::iota(std::begin(simplex_associated_to_key), std::end(simplex_associated_to_key), 0);
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 96036fd4..1eb77c9c 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
@@ -408,7 +408,7 @@ class Bitmap_cubical_complex_base {
void print_counter() const {
for (std::size_t i = 0; i != this->counter.size(); ++i) {
- std::cout << this->counter[i] << " ";
+ std::clog << this->counter[i] << " ";
}
}
friend class Bitmap_cubical_complex_base;
@@ -521,11 +521,11 @@ void Bitmap_cubical_complex_base<T>::put_data_to_bins(std::size_t number_of_bins
// now put the data into the appropriate bins:
for (std::size_t i = 0; i != this->data.size(); ++i) {
if (dbg) {
- std::cout << "Before binning : " << this->data[i] << std::endl;
+ std::clog << "Before binning : " << this->data[i] << std::endl;
}
this->data[i] = min_max.first + dx * (this->data[i] - min_max.first) / number_of_bins;
if (dbg) {
- std::cout << "After binning : " << this->data[i] << std::endl;
+ std::clog << "After binning : " << this->data[i] << std::endl;
}
}
}
@@ -539,11 +539,11 @@ void Bitmap_cubical_complex_base<T>::put_data_to_bins(T diameter_of_bin) {
// now put the data into the appropriate bins:
for (std::size_t i = 0; i != this->data.size(); ++i) {
if (dbg) {
- std::cout << "Before binning : " << this->data[i] << std::endl;
+ std::clog << "Before binning : " << this->data[i] << std::endl;
}
this->data[i] = min_max.first + diameter_of_bin * (this->data[i] - min_max.first) / number_of_bins;
if (dbg) {
- std::cout << "After binning : " << this->data[i] << std::endl;
+ std::clog << "After binning : " << this->data[i] << std::endl;
}
}
}
@@ -617,7 +617,7 @@ void Bitmap_cubical_complex_base<T>::read_perseus_style_file(const char* perseus
inFiltration >> dimensionOfData;
if (dbg) {
- std::cout << "dimensionOfData : " << dimensionOfData << std::endl;
+ std::clog << "dimensionOfData : " << dimensionOfData << std::endl;
}
std::vector<unsigned> sizes;
@@ -630,7 +630,7 @@ void Bitmap_cubical_complex_base<T>::read_perseus_style_file(const char* perseus
sizes.push_back(size_in_this_dimension);
dimensions *= size_in_this_dimension;
if (dbg) {
- std::cout << "size_in_this_dimension : " << size_in_this_dimension << std::endl;
+ std::clog << "size_in_this_dimension : " << size_in_this_dimension << std::endl;
}
}
this->set_up_containers(sizes);
@@ -651,7 +651,7 @@ void Bitmap_cubical_complex_base<T>::read_perseus_style_file(const char* perseus
}
if (dbg) {
- std::cout << "Cell of an index : " << it.compute_index_in_bitmap()
+ std::clog << "Cell of an index : " << it.compute_index_in_bitmap()
<< " and dimension: " << this->get_dimension_of_a_cell(it.compute_index_in_bitmap())
<< " get the value : " << filtrationLevel << std::endl;
}
@@ -754,20 +754,20 @@ std::vector<std::size_t> Bitmap_cubical_complex_base<T>::get_coboundary_of_a_cel
template <typename T>
unsigned Bitmap_cubical_complex_base<T>::get_dimension_of_a_cell(std::size_t cell) const {
bool dbg = false;
- if (dbg) std::cout << "\n\n\n Computing position o a cell of an index : " << cell << std::endl;
+ if (dbg) std::clog << "\n\n\n Computing position o a cell of an index : " << cell << std::endl;
unsigned dimension = 0;
for (std::size_t i = this->multipliers.size(); i != 0; --i) {
unsigned position = cell / this->multipliers[i - 1];
if (dbg) {
- std::cout << "i-1 :" << i - 1 << std::endl;
- std::cout << "cell : " << cell << std::endl;
- std::cout << "position : " << position << std::endl;
- std::cout << "multipliers[" << i - 1 << "] = " << this->multipliers[i - 1] << std::endl;
+ std::clog << "i-1 :" << i - 1 << std::endl;
+ std::clog << "cell : " << cell << std::endl;
+ std::clog << "position : " << position << std::endl;
+ std::clog << "multipliers[" << i - 1 << "] = " << this->multipliers[i - 1] << std::endl;
}
if (position % 2 == 1) {
- if (dbg) std::cout << "Nonzero length in this direction \n";
+ if (dbg) std::clog << "Nonzero length in this direction \n";
dimension++;
}
cell = cell % this->multipliers[i - 1];
@@ -803,9 +803,9 @@ void Bitmap_cubical_complex_base<T>::impose_lower_star_filtration() {
while (indices_to_consider.size()) {
if (dbg) {
- std::cout << "indices_to_consider in this iteration \n";
+ std::clog << "indices_to_consider in this iteration \n";
for (std::size_t i = 0; i != indices_to_consider.size(); ++i) {
- std::cout << indices_to_consider[i] << " ";
+ std::clog << indices_to_consider[i] << " ";
}
}
std::vector<std::size_t> new_indices_to_consider;
@@ -813,14 +813,14 @@ void Bitmap_cubical_complex_base<T>::impose_lower_star_filtration() {
std::vector<std::size_t> bd = this->get_boundary_of_a_cell(indices_to_consider[i]);
for (std::size_t boundaryIt = 0; boundaryIt != bd.size(); ++boundaryIt) {
if (dbg) {
- std::cout << "filtration of a cell : " << bd[boundaryIt] << " is : " << this->data[bd[boundaryIt]]
+ std::clog << "filtration of a cell : " << bd[boundaryIt] << " is : " << this->data[bd[boundaryIt]]
<< " while of a cell: " << indices_to_consider[i] << " is: " << this->data[indices_to_consider[i]]
<< std::endl;
}
if (this->data[bd[boundaryIt]] > this->data[indices_to_consider[i]]) {
this->data[bd[boundaryIt]] = this->data[indices_to_consider[i]];
if (dbg) {
- std::cout << "Setting the value of a cell : " << bd[boundaryIt]
+ std::clog << "Setting the value of a cell : " << bd[boundaryIt]
<< " to : " << this->data[indices_to_consider[i]] << std::endl;
}
}
diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h
index 3942dc34..18901469 100644
--- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h
+++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h
@@ -237,7 +237,7 @@ Bitmap_cubical_complex_periodic_boundary_conditions_base<T>::Bitmap_cubical_comp
if (inFiltration.eof()) break;
if (dbg) {
- std::cout << "Cell of an index : " << it.compute_index_in_bitmap()
+ std::clog << "Cell of an index : " << it.compute_index_in_bitmap()
<< " and dimension: " << this->get_dimension_of_a_cell(it.compute_index_in_bitmap())
<< " get the value : " << filtrationLevel << std::endl;
}
@@ -278,7 +278,7 @@ std::vector<std::size_t> Bitmap_cubical_complex_periodic_boundary_conditions_bas
std::size_t cell) const {
bool dbg = false;
if (dbg) {
- std::cout << "Computations of boundary of a cell : " << cell << std::endl;
+ std::clog << "Computations of boundary of a cell : " << cell << std::endl;
}
std::vector<std::size_t> boundary_elements;
@@ -300,7 +300,7 @@ std::vector<std::size_t> Bitmap_cubical_complex_periodic_boundary_conditions_bas
boundary_elements.push_back(cell - this->multipliers[i - 1]);
}
if (dbg) {
- std::cout << cell - this->multipliers[i - 1] << " " << cell + this->multipliers[i - 1] << " ";
+ std::clog << cell - this->multipliers[i - 1] << " " << cell + this->multipliers[i - 1] << " ";
}
} else {
// in this direction we have to do boundary conditions. Therefore, we need to check if we are not at the end.
@@ -313,7 +313,7 @@ std::vector<std::size_t> Bitmap_cubical_complex_periodic_boundary_conditions_bas
boundary_elements.push_back(cell - this->multipliers[i - 1]);
}
if (dbg) {
- std::cout << cell - this->multipliers[i - 1] << " " << cell + this->multipliers[i - 1] << " ";
+ std::clog << cell - this->multipliers[i - 1] << " " << cell + this->multipliers[i - 1] << " ";
}
} else {
if (sum_of_dimensions % 2) {
@@ -324,7 +324,7 @@ std::vector<std::size_t> Bitmap_cubical_complex_periodic_boundary_conditions_bas
boundary_elements.push_back(cell - this->multipliers[i - 1]);
}
if (dbg) {
- std::cout << cell - this->multipliers[i - 1] << " "
+ std::clog << cell - this->multipliers[i - 1] << " "
<< cell - (2 * this->sizes[i - 1] - 1) * this->multipliers[i - 1] << " ";
}
}
diff --git a/src/Bitmap_cubical_complex/test/Bitmap_test.cpp b/src/Bitmap_cubical_complex/test/Bitmap_test.cpp
index f18adb36..6f35b6da 100644
--- a/src/Bitmap_cubical_complex/test/Bitmap_test.cpp
+++ b/src/Bitmap_cubical_complex/test/Bitmap_test.cpp
@@ -1402,12 +1402,12 @@ BOOST_AUTO_TEST_CASE(check_if_boundary_of_boundary_is_zero_periodic_case_2d) {
it != ba.all_cells_iterator_end(); ++it) {
int i = 1;
- // std::cout << "Element : " << *it << std::endl;
+ // std::clog << "Element : " << *it << std::endl;
Bitmap_cubical_complex_periodic_boundary_conditions_base::Boundary_range bdrange = ba.boundary_range(*it);
for (Bitmap_cubical_complex_periodic_boundary_conditions::Boundary_iterator bd = bdrange.begin();
bd != bdrange.end(); ++bd) {
- // std::cout << *bd << " ";
+ // std::clog << *bd << " ";
Bitmap_cubical_complex_periodic_boundary_conditions::Boundary_range second_bdrange = ba.boundary_range(*bd);
int j = 1;
for (Bitmap_cubical_complex_periodic_boundary_conditions::Boundary_iterator bd2 = second_bdrange.begin();
@@ -1441,7 +1441,7 @@ BOOST_AUTO_TEST_CASE(check_if_boundary_of_boundary_is_zero_periodic_case_3d) {
std::vector<int> elems_in_boundary(number_of_all_elements, 0);
for (Bitmap_cubical_complex_periodic_boundary_conditions::All_cells_iterator it = ba.all_cells_iterator_begin();
it != ba.all_cells_iterator_end(); ++it) {
- // std::cout << "Element : " << *it << std::endl;
+ // std::clog << "Element : " << *it << std::endl;
int i = 1;
@@ -1449,7 +1449,7 @@ BOOST_AUTO_TEST_CASE(check_if_boundary_of_boundary_is_zero_periodic_case_3d) {
for (Bitmap_cubical_complex_periodic_boundary_conditions::Boundary_iterator bd = bdrange.begin();
bd != bdrange.end(); ++bd) {
Bitmap_cubical_complex_periodic_boundary_conditions::Boundary_range second_bdrange = ba.boundary_range(*bd);
- // std::cout << *bd << " ";
+ // std::clog << *bd << " ";
int j = 1;
for (Bitmap_cubical_complex_periodic_boundary_conditions::Boundary_iterator bd2 = second_bdrange.begin();
bd2 != second_bdrange.end(); ++bd2) {
@@ -1551,7 +1551,7 @@ BOOST_AUTO_TEST_CASE(compute_incidence_between_cells_test_periodic_boundary_cond
Bitmap_cubical_complex_periodic_boundary_conditions_base::Boundary_range bdrange = ba.boundary_range(*it);
for (Bitmap_cubical_complex_periodic_boundary_conditions::Boundary_iterator bd = bdrange.begin();
bd != bdrange.end(); ++bd) {
- // std::cout << *bd << " ";
+ // std::clog << *bd << " ";
Bitmap_cubical_complex_periodic_boundary_conditions::Boundary_range second_bdrange = ba.boundary_range(*bd);
for (Bitmap_cubical_complex_periodic_boundary_conditions::Boundary_iterator bd2 = second_bdrange.begin();
bd2 != second_bdrange.end(); ++bd2) {
@@ -1571,11 +1571,11 @@ BOOST_AUTO_TEST_CASE(perseus_file_read) {
auto it = increasing.top_dimensional_cells_iterator_begin();
double value = increasing.get_cell_data(*it);
- std::cout << "First value of sinusoid.txt is " << value << std::endl;
+ std::clog << "First value of sinusoid.txt is " << value << std::endl;
BOOST_CHECK(value == 10.);
// Next value
++it;
value = increasing.get_cell_data(*it);
- std::cout << "Second value of sinusoid.txt is " << value << std::endl;
+ std::clog << "Second value of sinusoid.txt is " << value << std::endl;
BOOST_CHECK(value == std::numeric_limits<double>::infinity());
}
diff --git a/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp b/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp
index a9792c2d..510861cd 100644
--- a/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp
+++ b/src/Bitmap_cubical_complex/utilities/cubical_complex_persistence.cpp
@@ -19,7 +19,7 @@
#include <cstddef>
int main(int argc, char** argv) {
- std::cout
+ std::clog
<< "This program computes persistent homology, by using bitmap_cubical_complex class, of cubical "
<< "complexes provided in text files in Perseus style (the only numbered in the first line is a dimension D of a"
<< "bitmap. In the lines I between 2 and D+1 there are numbers of top dimensional cells in the direction I. Let "
@@ -62,7 +62,7 @@ int main(int argc, char** argv) {
pcoh.output_diagram(out);
out.close();
- std::cout << "Result in file: " << output_file_name << "\n";
+ std::clog << "Result in file: " << output_file_name << "\n";
return 0;
}
diff --git a/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp b/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp
index fa97bac0..86816417 100644
--- a/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp
+++ b/src/Bitmap_cubical_complex/utilities/periodic_cubical_complex_persistence.cpp
@@ -20,7 +20,7 @@
#include <string>
int main(int argc, char** argv) {
- std::cout
+ std::clog
<< "This program computes persistent homology, by using "
<< "Bitmap_cubical_complex_periodic_boundary_conditions class, of cubical complexes provided in text files in "
<< "Perseus style (the only numbered in the first line is a dimension D of a bitmap. In the lines I between 2 "
@@ -64,7 +64,7 @@ int main(int argc, char** argv) {
pcoh.output_diagram(out);
out.close();
- std::cout << "Result in file: " << output_file_name << "\n";
+ std::clog << "Result in file: " << output_file_name << "\n";
return 0;
}