From 681f282d77a8554fd18701b6d5287e1a3aff182d Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Tue, 9 Oct 2012 12:55:09 +0000 Subject: [PATCH] Fix by Daniel Russel to make testsuite greener Raise "NUMERICAL ISSUE" instead of "WARNING". The latter made some rows of the testsuite completely yellow. Fix has been tested locally. --- .../include/CGAL/Kinetic/Sort.h | 56 +++++++++---------- .../Polynomial_kernel/include/Check_solver.h | 12 ++-- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Sort.h b/Kinetic_data_structures/include/CGAL/Kinetic/Sort.h index dd4a286f16a..d5e0a34ad57 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Sort.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Sort.h @@ -14,7 +14,7 @@ // // $URL$ // $Id$ -// +// // // Author(s) : Daniel Russel @@ -54,7 +54,7 @@ template class Sort: typedef typename Traits::Active_points_1_table TTable; typedef typename Traits::Kinetic_kernel::Compare_x_1 KLess; typedef typename Traits::Instantaneous_kernel::Compare_x_1 IComp; - + //typedef typename Traits::Instantaneous_kernel::Compare_x_1 ILess; typedef Sort This; @@ -69,7 +69,7 @@ template class Sort: // STL algorithms want less rather than compare. So we need to convert. struct ILess { ILess(IComp ic): ic_(ic){} - + bool operator()(Object_key a, Object_key b) const { bool ret=( ic_(a,b) == CGAL::SMALLER); return ret; @@ -113,16 +113,16 @@ template class Sort: } Less less_; }*/ - + typedef Swap_event Event; friend class Swap_event; // Redirects the Simulator notifications to function calls CGAL_KINETIC_DECLARE_LISTENERS(typename Traits::Simulator, typename Active_objects_table) public: - + // Register this KDS with the MovingObjectTable and the Simulator - Sort(Traits tr, Visitor v=Visitor()/*, + Sort(Traits tr, Visitor v=Visitor()/*, typedef Active_objects_table::Handle aot, Kinetic_less kless=tr.kinetic_kernel_object().is_less_x_1_object(), Instantaneous_less iless*/): compare_(tr.kinetic_kernel_object().compare_x_1_object()), @@ -161,9 +161,9 @@ public: k, iless_); CGAL_LOG(Log::LOTS, "\nInserting " << k); if (it != sorted_.end()) { - CGAL_LOG(Log::LOTS, " before " << it->object() <object() <delete_event(n->event()); n->set_event(Event_key()); } - + it->swap(*n); - + CGAL_LOG(Log::LOTS, "Updating next certificate " << std::endl); if (n != sorted_.end()) { rebuild_certificate(n); @@ -241,14 +241,14 @@ public: } else { it->set_event(simulator_->null_event()); } - - + + CGAL_LOG(Log::LOTS, "Updating prev certificate " << std::endl); if (it != sorted_.begin()) { rebuild_certificate(prior(it)); } v_.post_swap(it, n); - + CGAL_LOG_WRITE(Log::LOTS, write(LOG_STREAM)); } @@ -261,18 +261,18 @@ public: std::cerr << "ERROR: objects " << it->object() << " and " << next(it)->object() << " are out of order.\n"; std::cerr << "Kinetic are " << aot_->at(it->object()) << " and " << aot_->at(*next(it)) << std::endl; - std::cerr << "Time is " << ik_.time() << std::endl; - /*std::cerr << "Static are " << ik_.current_coordinates_object()(it->object()) << " and " + std::cerr << "Time is " << ik_.time() << std::endl; + /*std::cerr << "Static are " << ik_.current_coordinates_object()(it->object()) << " and " << ik_.current_coordinates_object()(next(it)->object()) << std::endl;*/ std::cerr << "ERROR: order is "; #else if (warned_.find(*it) == warned_.end() || warned_[*it].find(*next(it)) == warned_[*it].end()) { - std::cerr << "WARNING: objects " << it->object() << " and " + std::cerr << "NUMERIC ISSUE: objects " << it->object() << " and " << next(it)->object() << " are out of order.\n"; std::cerr << aot_->at(it->object()) << " and " << aot_->at(next(it)->object()) << std::endl; - std::cerr << "Time is " << ik_.time() << std::endl; - std::cerr << "WARNING: order is "; + std::cerr << "Time is " << ik_.time() << std::endl; + std::cerr << "NUMERIC ISSUE: order is "; } #endif write(std::cerr); @@ -288,25 +288,25 @@ public: } } } - if (compare_.sign_at( aot_->at(it->object()), + if (compare_.sign_at( aot_->at(it->object()), aot_->at(next(it)->object()), simulator_->current_time()) == CGAL::LARGER) { #ifdef CGAL_KINETIC_CHECK_EXACTNESS std::cerr << "ERROR: kinetic objects " << it->object() << " and " << next(it)->object() << " are out of order.\n"; std::cerr << "Kinetic are " << aot_->at(it->object()) << " and " << aot_->at(*next(it)) << std::endl; - std::cerr << "Time is " <object()) << " and " + std::cerr << "Time is " <object()) << " and " << ik_.current_coordinates_object()(next(it)->object()) << std::endl;*/ std::cerr << "ERROR: order is "; #else if (warned_.find(*it) == warned_.end() || warned_[*it].find(*next(it)) == warned_[*it].end()) { - std::cerr << "WARNING: objects " << it->object() << " and " + std::cerr << "NUMERIC ISSUE: objects " << it->object() << " and " << next(it)->object() << " are out of order.\n"; std::cerr << aot_->at(it->object()) << " and " << aot_->at(next(it)->object()) << std::endl; - std::cerr << "Time is " <::const_iterator it = sorted_.begin(); it->object() != sorted_.back().object(); ++it) { @@ -371,7 +371,7 @@ public: //iterator it = std::equal_range(sorted_.begin(), sorted_.end(),k).first; CGAL_precondition(it != sorted_.end()); CGAL_precondition(it->object() == k); - + v_.pre_remove_vertex(it); if (next(it) != Iterator(end())) { simulator_->delete_event(it->event()); @@ -453,7 +453,7 @@ public: if (s_.will_fail()) out << " next is " << s_.failure_time(); else out << " out of failures"; } - void audit(typename Sort::Event_key + void audit(typename Sort::Event_key #ifndef NDEBUG tk #endif diff --git a/Kinetic_data_structures/test/Polynomial_kernel/include/Check_solver.h b/Kinetic_data_structures/test/Polynomial_kernel/include/Check_solver.h index 23eb1a1c917..5dc41b49884 100644 --- a/Kinetic_data_structures/test/Polynomial_kernel/include/Check_solver.h +++ b/Kinetic_data_structures/test/Polynomial_kernel/include/Check_solver.h @@ -36,7 +36,7 @@ public: /*void time_estimate(const Fn &, const Rt& , False){ } - + void time_estimate(const Fn &q, const Rt& start, True){ Root_stack s= k_.root_stack_object(q, start, std::numeric_limits::infinity()); CGAL::Timer timer; @@ -92,7 +92,7 @@ public: if (reps==0 && verbose) { //comp.push_back(CGAL::to_double(r)); if (last_root > s.top()) { - std::cerr << "WARNING last root was " << last_root << " and current root is " + std::cerr << "NUMERIC ISSUE last root was " << last_root << " and current root is " << s.top() << std::endl; } CGAL_assertion(last_root<= s.top()); @@ -103,13 +103,13 @@ public: int i=0; }*/ roots.push_back(s.top()); - + std::cout << "<" << CGAL::to_double(s.top()); //if (iem(s.top())) { std::cout <<"E";} std::cout << "> " << std::flush; /*} else { - + }*/ } s.pop(); @@ -152,11 +152,11 @@ public: std::cout << std::endl; for (unsigned int i=0; i< taken_maple.size(); ++i) { if (!taken_maple[i]) - std::cerr << "WARNING Missing " << roots_b[i] << std::endl; + std::cerr << "NUMERIC ISSUE Missing " << roots_b[i] << std::endl; } for (unsigned int i=0; i< taken_solver.size(); ++i) { - if (!taken_solver[i]) std::cerr << "WARNING Extra " << roots[i] << std::endl; + if (!taken_solver[i]) std::cerr << "NUMERIC ISSUE Extra " << roots[i] << std::endl; } }