//#define XERR
#include "densities.ih"

// static
bool Densities::proportions(vector<double> const &vect)
{
    return 
        find_if(vect.begin(), vect.end(),
            [&](double value)
            {
                return value < 0 or 1 < value;  // if not in [0..1] then
            }                                   // not a proportion -> 
        )                                       // vect.end() is not returned
        == vect.end();
}

