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