-RM-244-MR-WHistogramBasic, off-by-one error.
The documentation says the intervals are right open, but the implementations does something different. The unittest do not fail, as symptom is actually fixed reducing the number of bins.
m_bins.at( static_cast< size_t >( ( value - m_minimum ) / std::abs( m_maximum - m_minimum ) * ( m_nbBuckets - 1 ) ) )++;
There the @m_nbBuckets -1@ is actually securing that no @bin-index >= bins.size@ occurs. This leads also to invalid unittests:
h.insert( 0.7234 ); TS_ASSERT_EQUALS( h.size(), 1000 ); TS_ASSERT_EQUALS( h.valuesSize(), 1 ); TS_ASSERT_EQUALS( h, 1 );
Where it should actually be bucket number 723.
(from redmine: created on 2013-02-13, closed on 2013-02-13)