#include <Consistency.h>
Inheritance diagram for Consistency:
Public Types | |
OK = 0 | |
noMeasure | |
underFlow | |
unPhysical | |
left = -1 | |
unknown = 0 | |
right = 1 | |
enum | ConsistentStatus { OK = 0, noMeasure, underFlow, unPhysical } |
enum | ConsistentSign { left = -1, unknown = 0, right = 1 } |
Public Member Functions | |
Consistency () | |
Consistency (double consistency, double likelihood=0.) | |
Consistency (const Consistency &rhs) | |
virtual | ~Consistency () |
Consistency & | operator= (const Consistency &rhs) |
bool | operator== (const Consistency &rhs) const |
bool | operator< (const Consistency &rhs) const |
bool | operator> (const Consistency &rhs) const |
double | significanceLevel () const |
double | likelihood () const |
double | consistency () const |
ConsistentStatus | status () const |
void | setStatus (ConsistentStatus s) |
ConsistentSign | sign () const |
void | setSign (ConsistentSign s) |
virtual const ConsistencySet * | genealogy () const |
virtual void | print (std::ostream &) const |
Static Public Member Functions | |
static const Consistency & | badMeasurement () |
Protected Attributes | |
ConsistentStatus | _stat |
ConsistentSign | _sign |
double | _value |
double | _likelihood |
Definition at line 53 of file Consistency.h.
Consistency::Consistency | ( | ) |
Consistency::Consistency | ( | double | consistency, | |
double | likelihood = 0. | |||
) |
Consistency::Consistency | ( | const Consistency & | rhs | ) |
Definition at line 64 of file Consistency.cxx.
00065 : _stat(rhs._stat), _value(rhs._value) 00066 , _likelihood(rhs._likelihood), _sign(rhs._sign) 00067 { 00068 }
virtual Consistency::~Consistency | ( | ) | [inline, virtual] |
const Consistency & Consistency::badMeasurement | ( | ) | [static] |
Definition at line 172 of file Consistency.cxx.
References noMeasure, and setStatus().
00173 { 00174 static Consistency bad(1.,1.); 00175 bad.setStatus(noMeasure); 00176 00177 return bad; 00178 }
double Consistency::consistency | ( | ) | const [inline] |
const ConsistencySet * Consistency::genealogy | ( | ) | const [virtual] |
double Consistency::likelihood | ( | ) | const [inline] |
bool Consistency::operator< | ( | const Consistency & | rhs | ) | const |
Definition at line 98 of file Consistency.cxx.
References _stat, _value, and OK.
00099 { 00100 // 00101 // this is not unique... 00102 // 00103 00104 bool answer = false; 00105 if (_stat == OK && rhs._stat == OK ) { 00106 // 00107 // Dare to use consistency for comparison. 00108 // Likelihood may give a different answer 00109 // 00110 if (_value < rhs._value) { 00111 answer = true; 00112 } 00113 } else { 00114 if (rhs._stat == OK) { 00115 answer = true; 00116 } 00117 } 00118 00119 return answer; 00120 }
Consistency & Consistency::operator= | ( | const Consistency & | rhs | ) |
Definition at line 72 of file Consistency.cxx.
References _likelihood, _sign, _stat, and _value.
Referenced by ChisqConsistency::operator=().
00073 { 00074 if(this != &rhs){ 00075 _stat=rhs._stat; 00076 _value=rhs._value; 00077 _likelihood=rhs._likelihood; 00078 _sign=rhs._sign; 00079 } 00080 return *this; 00081 }
bool Consistency::operator== | ( | const Consistency & | rhs | ) | const |
Definition at line 84 of file Consistency.cxx.
References _likelihood, _sign, _stat, and _value.
00085 { 00086 bool answer = false; 00087 if (_stat == rhs._stat && 00088 _value == rhs._value && 00089 _likelihood == rhs._likelihood && 00090 _sign == rhs._sign) { 00091 answer = true; 00092 } 00093 00094 return answer; 00095 }
bool Consistency::operator> | ( | const Consistency & | rhs | ) | const |
virtual void Consistency::print | ( | std::ostream & | ) | const [virtual] |
void Consistency::setSign | ( | ConsistentSign | s | ) | [inline] |
void Consistency::setStatus | ( | ConsistentStatus | s | ) | [inline] |
Definition at line 107 of file Consistency.h.
References _stat.
Referenced by badMeasurement(), and ChisqConsistency::ChisqConsistency().
ConsistentSign Consistency::sign | ( | ) | const [inline] |
double Consistency::significanceLevel | ( | ) | const [inline] |
ConsistentStatus Consistency::status | ( | void | ) | const [inline] |
double Consistency::_likelihood [protected] |
Definition at line 135 of file Consistency.h.
Referenced by ChisqConsistency::ChisqConsistency(), likelihood(), operator=(), and operator==().
ConsistentSign Consistency::_sign [protected] |
Definition at line 133 of file Consistency.h.
Referenced by operator=(), operator==(), setSign(), and sign().
ConsistentStatus Consistency::_stat [protected] |
Definition at line 132 of file Consistency.h.
Referenced by operator<(), operator=(), operator==(), setStatus(), and status().
double Consistency::_value [protected] |
Definition at line 134 of file Consistency.h.
Referenced by ChisqConsistency::ChisqConsistency(), consistency(), operator<(), operator=(), operator==(), and significanceLevel().