#include <assert.h>
#include <iostream>
#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 67 of file EvtValError.hh.
67 {
68 int itsTried = 0;
69 int itsPassed = 0;
70 while ( it != end )
71 {
72
73 itsTried++;
74 if ( pred( *it++ ) ) itsPassed++;
75 }
76
77 return EvtValError( ( (
double)itsPassed ) / ( (
double)itsTried ),
78 sqrt( itsPassed ) / ( (double)itsTried ) );
79}
◆ operator*() [1/3]
Definition at line 115 of file EvtValError.cc.
115 {
117 ret *= c;
118 return ret;
119}
◆ operator*() [2/3]
Definition at line 97 of file EvtValError.cc.
97 {
99 ret *= x2;
100 return ret;
101}
◆ operator*() [3/3]
Definition at line 121 of file EvtValError.cc.
121 {
123 ret *= c;
124 return ret;
125}
◆ operator+()
Definition at line 109 of file EvtValError.cc.
109 {
111 ret += x2;
112 return ret;
113}
◆ operator/()
Definition at line 103 of file EvtValError.cc.
103 {
105 ret /= x2;
106 return ret;
107}
◆ operator<<()
| std::ostream & operator<< |
( |
std::ostream & | , |
|
|
const EvtValError & | ) |