13#ifndef EVT_VAL_ERROR_HH
14#define EVT_VAL_ERROR_HH
31 inline double value()
const { assert(_valKnown);
return _val; }
33 inline double error()
const { assert(_errKnown);
return _err; }
42 void print(std::ostream&)
const;
64template <
class InputIterator,
class Predicate>
72 if(pred(*it++)) itsPassed++;
75 return EvtValError(((
double) itsPassed)/((
double) itsTried),sqrt(itsPassed)/((
double) itsTried));
std::ostream & operator<<(std::ostream &, const EvtValError &)
EvtValError operator+(const EvtValError &x1, const EvtValError &x2)
EvtValError operator/(const EvtValError &x1, const EvtValError &x2)
EvtValError accept_reject(InputIterator it, InputIterator end, Predicate pred)
EvtValError operator*(const EvtValError &x1, const EvtValError &x2)
void operator=(const EvtValError &other)
void operator/=(const EvtValError &other)
void operator+=(const EvtValError &other)
void operator*=(const EvtValError &other)
void print(std::ostream &) const