#include <iostream>
#include <assert.h>
#include <math.h>
Go to the source code of this file.
◆ accept_reject()
template<class InputIterator , class Predicate >
EvtValError accept_reject |
( |
InputIterator | it, |
|
|
InputIterator | end, |
|
|
Predicate | pred ) |
Definition at line 65 of file EvtValError.hh.
66{
67 int itsTried = 0;
68 int itsPassed = 0;
69 while(it != end) {
70
71 itsTried++;
72 if(pred(*it++)) itsPassed++;
73 }
74
75 return EvtValError(((
double) itsPassed)/((
double) itsTried),sqrt(itsPassed)/((
double) itsTried));
76}
◆ operator*() [1/3]
◆ operator*() [2/3]
Definition at line 115 of file EvtValError.cc.
116{
118 ret *= x2;
119 return ret;
120}
◆ operator*() [3/3]
◆ operator+()
Definition at line 130 of file EvtValError.cc.
131{
133 ret += x2;
134 return ret;
135}
◆ operator/()
Definition at line 122 of file EvtValError.cc.
123{
125 ret /= x2;
126 return ret;
127}
◆ operator<<()
std::ostream & operator<< |
( |
std::ostream & | , |
|
|
const EvtValError & | ) |