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 --- src/Toplex_map/benchmark/benchmark_tm.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/Toplex_map/benchmark/benchmark_tm.cpp') diff --git a/src/Toplex_map/benchmark/benchmark_tm.cpp b/src/Toplex_map/benchmark/benchmark_tm.cpp index feb5d01c..d078fcf8 100644 --- a/src/Toplex_map/benchmark/benchmark_tm.cpp +++ b/src/Toplex_map/benchmark/benchmark_tm.cpp @@ -25,10 +25,10 @@ typedef std::pair::Simplex_handle, bool> typePairSimplexBool; class ST_wrapper { public: void insert_simplex(const Simplex& tau) { - /*std::cout << "insert_simplex - " << simplexTree.num_simplices() << " - "; + /*std::clog << "insert_simplex - " << simplexTree.num_simplices() << " - "; for (auto v : tau) - std::cout << v << ", "; - std::cout << std::endl; + std::clog << v << ", "; + std::clog << std::endl; */ simplexTree.insert_simplex_and_subfaces(tau); } @@ -104,22 +104,22 @@ void chrono(int n, int d) { auto c2 = std::chrono::duration_cast(end - start).count(); if (c3 > 0) - std::cout << c1 << "\t \t" << c2 << "\t \t" << c3 << "\t \t" << K.num_maximal_simplices() << std::endl; + std::clog << c1 << "\t \t" << c2 << "\t \t" << c3 << "\t \t" << K.num_maximal_simplices() << std::endl; else - std::cout << c1 << "\t \t" << c2 << "\t \tN/A\t \t" << K.num_maximal_simplices() << std::endl; + std::clog << c1 << "\t \t" << c2 << "\t \tN/A\t \t" << K.num_maximal_simplices() << std::endl; } int main() { for (int d = 5; d <= 40; d += 5) { - std::cout << "d=" << d << " \t Insertions \t Membership \t Contractions \t Size" << std::endl; - std::cout << "T Map \t \t"; + std::clog << "d=" << d << " \t Insertions \t Membership \t Contractions \t Size" << std::endl; + std::clog << "T Map \t \t"; chrono(n, d); - std::cout << "Lazy \t \t"; + std::clog << "Lazy \t \t"; chrono(n, d); if (d <= 15) { - std::cout << "ST \t \t"; + std::clog << "ST \t \t"; chrono(n, d); } - std::cout << std::endl; + std::clog << std::endl; } } -- cgit v1.2.3