Add CDF utility

Compute CDF from input data without binning.
I agree that for the reason you are giving for doubles the counting part
does not make sense as it is written now.
For double input all mapped values will be unity.
The counting part only makes sense for integer input.
For integer input the mapped values can be larger than unity and the
counting part is OK.
Therefore it could be an option to have the input type as template
parameter.

On 13 September 2014 10:46, Jacob Stevenson <notifications@github.com>
wrote:

> In source/mcpele/cdf_accumulator.h:
>
> > @@ -0,0 +1,23 @@
> > +#ifndef _MCPELE_CDF_ACCUMULATOR_H
> > +#define _MCPELE_CDF_ACCUMULATOR_H
> > +
> > +#include <map>
> > +#include <vector>
> > +
> > +namespace mcpele{
> > +
> > +class CDFAccumulator {
> > +private:
> > +    std::map<double, size_t> m_data_x;
>
> But I don't understand. You are counting how often each number appears.
> But doubles are approximately continuous, so a number will never appear
> more than once.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pele-python/mcpele/pull/34/files#r17511453>.
>