#include <CInformationCalculator.h>

Public Member Functions | |
| CICERelative (double inThreshold=1.0) | |
| CICERelative (const CICERelative &in) | |
| void | setThreshold (double inThreshold) |
| virtual bool | isOnePass () const |
| virtual void | startFirstPass () |
| virtual void | adjustInnerState (double) |
| virtual double | operator() (double) const |
| really applying this function | |
| virtual CInformationCalculator * | subClone () const |
Private Attributes | |
| double | mSum |
| double | mThreshold |
Definition at line 83 of file CInformationCalculator.h.
| CICERelative::CICERelative | ( | double | inThreshold = 1.0 |
) |
Definition at line 114 of file CInformationCalculator.cc.
References setThreshold().
Referenced by subClone().
00114 { 00115 setThreshold(inThreshold); 00116 }
| CICERelative::CICERelative | ( | const CICERelative & | in | ) |
Definition at line 118 of file CInformationCalculator.cc.
References mSum, and mThreshold.
00118 { 00119 mThreshold = in.mThreshold; 00120 mSum = in.mSum; 00121 }
| void CICERelative::setThreshold | ( | double | inThreshold | ) |
Definition at line 123 of file CInformationCalculator.cc.
References mThreshold.
Referenced by CICERelative().
00123 { 00124 mThreshold=inThreshold; 00125 };
| bool CICERelative::isOnePass | ( | ) | const [virtual] |
Reimplemented from CInformationCalculator.
Definition at line 128 of file CInformationCalculator.cc.
| void CICERelative::startFirstPass | ( | ) | [virtual] |
Reimplemented from CInformationCalculator.
Definition at line 132 of file CInformationCalculator.cc.
References mSum.
00132 { 00133 mSum=0; 00134 };
| void CICERelative::adjustInnerState | ( | double | inValue | ) | [virtual] |
Reimplemented from CInformationCalculator.
Definition at line 136 of file CInformationCalculator.cc.
References mSum.
00136 { 00137 mSum+=inValue; 00138 };
| double CICERelative::operator() | ( | double | ) | const [virtual] |
really applying this function
Implements CInformationCalculator.
Definition at line 140 of file CInformationCalculator.cc.
References mSum, and mThreshold.
00140 { 00141 /* if((inProbability 00142 > 00143 mThreshold) 00144 && 00145 (mSum>0)) 00146 cout << "+"; 00147 else 00148 cout << "-";*/ 00149 00150 return 00151 ((inProbability 00152 > 00153 mThreshold) 00154 && 00155 (mSum>0)) 00156 ? -log(inProbability/mSum)*(inProbability/mSum) 00157 : 0; 00158 }
| CInformationCalculator * CICERelative::subClone | ( | ) | const [virtual] |
Implements CInformationCalculator.
Definition at line 160 of file CInformationCalculator.cc.
References CICERelative().
00160 { 00161 return new CICERelative(*this); 00162 }
double CICERelative::mSum [private] |
Definition at line 85 of file CInformationCalculator.h.
Referenced by adjustInnerState(), CICERelative(), operator()(), and startFirstPass().
double CICERelative::mThreshold [private] |
Definition at line 87 of file CInformationCalculator.h.
Referenced by CICERelative(), operator()(), and setThreshold().
1.5.6