Skip to content
Snippets Groups Projects
Commit 763643b4 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add SuccessStatistics::isLowRatio

parent e1419da5
No related branches found
No related tags found
No related merge requests found
...@@ -142,11 +142,18 @@ namespace hpp { ...@@ -142,11 +142,18 @@ namespace hpp {
{ {
insert (SuccessBin (false, r)); insert (SuccessBin (false, r));
#ifdef HPP_DEBUG #ifdef HPP_DEBUG
if (logRatio_ * nbSuccess () < numberOfObservations()) isLowRatio (true);
hppDout (info, "Success statistics " << name_ << ":\n" << *this);
#endif #endif
} }
inline bool isLowRatio (const bool autoPrint = false) const
{
bool lowRatio = (logRatio_ * nbSuccess () < numberOfObservations());
if (autoPrint && lowRatio)
hppDout (info, "Success statistics " << name_ << ":\n" << *this);
return lowRatio;
}
/// Count the number of success. /// Count the number of success.
std::size_t nbSuccess () const std::size_t nbSuccess () const
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment