From bf4b4eeda9762ed9e99c2b24f19331fa0111fcfe Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 27 Jan 2020 10:43:16 +0100 Subject: Code review: Use std::clog instead of std::cout --- .../example/persistence_landscape_on_grid.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/Persistence_representations/example/persistence_landscape_on_grid.cpp') diff --git a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp index 16a58e1d..6d58e167 100644 --- a/src/Persistence_representations/example/persistence_landscape_on_grid.cpp +++ b/src/Persistence_representations/example/persistence_landscape_on_grid.cpp @@ -37,31 +37,31 @@ int main(int argc, char** argv) { Persistence_landscape_on_grid l2(persistence2, 0, 11, 20); // This is how to compute integral of landscapes: - std::cout << "Integral of the first landscape : " << l1.compute_integral_of_landscape() << std::endl; - std::cout << "Integral of the second landscape : " << l2.compute_integral_of_landscape() << std::endl; + std::clog << "Integral of the first landscape : " << l1.compute_integral_of_landscape() << std::endl; + std::clog << "Integral of the second landscape : " << l2.compute_integral_of_landscape() << std::endl; // And here how to write landscapes to stream: - std::cout << "l1 : " << l1 << std::endl; - std::cout << "l2 : " << l2 << std::endl; + std::clog << "l1 : " << l1 << std::endl; + std::clog << "l2 : " << l2 << std::endl; // here are the maxima of the functions: - std::cout << "Maximum of l1 : " << l1.compute_maximum() << std::endl; - std::cout << "Maximum of l2 : " << l2.compute_maximum() << std::endl; + std::clog << "Maximum of l1 : " << l1.compute_maximum() << std::endl; + std::clog << "Maximum of l2 : " << l2.compute_maximum() << std::endl; // here are the norms of landscapes: - std::cout << "L^1 Norm of l1 : " << l1.compute_norm_of_landscape(1.) << std::endl; - std::cout << "L^1 Norm of l2 : " << l2.compute_norm_of_landscape(1.) << std::endl; + std::clog << "L^1 Norm of l1 : " << l1.compute_norm_of_landscape(1.) << std::endl; + std::clog << "L^1 Norm of l2 : " << l2.compute_norm_of_landscape(1.) << std::endl; // here is the average of landscapes: Persistence_landscape_on_grid average; average.compute_average({&l1, &l2}); - std::cout << "average : " << average << std::endl; + std::clog << "average : " << average << std::endl; // here is the distance of landscapes: - std::cout << "Distance : " << l1.distance(l2) << std::endl; + std::clog << "Distance : " << l1.distance(l2) << std::endl; // here is the scalar product of landscapes: - std::cout << "Scalar product : " << l1.compute_scalar_product(l2) << std::endl; + std::clog << "Scalar product : " << l1.compute_scalar_product(l2) << std::endl; // here is how to create a file which is suitable for visualization via gnuplot: average.plot("average_landscape"); -- cgit v1.2.3