#include <CInformationCalculator.h>

Public Member Functions | |
| CICEntropyWithThreshold (double inThreshold=1.0) | |
| CICEntropyWithThreshold (const CICEntropyWithThreshold &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 | mMaximum |
| double | mThreshold |
Definition at line 57 of file CInformationCalculator.h.
| CICEntropyWithThreshold::CICEntropyWithThreshold | ( | double | inThreshold = 1.0 |
) |
Definition at line 62 of file CInformationCalculator.cc.
References setThreshold().
Referenced by subClone().
00062 { 00063 setThreshold(inThreshold); 00064 }
| CICEntropyWithThreshold::CICEntropyWithThreshold | ( | const CICEntropyWithThreshold & | in | ) |
Definition at line 66 of file CInformationCalculator.cc.
References mMaximum, and mThreshold.
00067 { 00068 mThreshold = in.mThreshold; 00069 mMaximum = in.mMaximum; 00070 }
| void CICEntropyWithThreshold::setThreshold | ( | double | inThreshold | ) |
Definition at line 72 of file CInformationCalculator.cc.
References mThreshold.
Referenced by CICEntropyWithThreshold().
00072 { 00073 mThreshold=inThreshold; 00074 };
| bool CICEntropyWithThreshold::isOnePass | ( | ) | const [virtual] |
| void CICEntropyWithThreshold::startFirstPass | ( | ) | [virtual] |
Reimplemented from CInformationCalculator.
Definition at line 81 of file CInformationCalculator.cc.
References mMaximum.
00081 { 00082 mMaximum=-1e30; 00083 };
| void CICEntropyWithThreshold::adjustInnerState | ( | double | inValue | ) | [virtual] |
Reimplemented from CInformationCalculator.
Definition at line 85 of file CInformationCalculator.cc.
References mMaximum.
| double CICEntropyWithThreshold::operator() | ( | double | ) | const [virtual] |
really applying this function
Implements CInformationCalculator.
Definition at line 90 of file CInformationCalculator.cc.
References mMaximum, and mThreshold.
00090 { 00091 #ifdef _debug 00092 if(inProbability 00093 > 00094 mMaximum*mThreshold){ 00095 cout << '+' ; 00096 }else{ 00097 cout << '-'; 00098 } 00099 #endif 00100 00101 return 00102 (inProbability 00103 > 00104 mMaximum*mThreshold) 00105 ? -log(inProbability)*inProbability 00106 : 0; 00107 }
| CInformationCalculator * CICEntropyWithThreshold::subClone | ( | ) | const [virtual] |
Implements CInformationCalculator.
Definition at line 109 of file CInformationCalculator.cc.
References CICEntropyWithThreshold().
00109 { 00110 return new CICEntropyWithThreshold(*this); 00111 }
double CICEntropyWithThreshold::mMaximum [private] |
Definition at line 59 of file CInformationCalculator.h.
Referenced by adjustInnerState(), CICEntropyWithThreshold(), operator()(), and startFirstPass().
double CICEntropyWithThreshold::mThreshold [private] |
Definition at line 61 of file CInformationCalculator.h.
Referenced by CICEntropyWithThreshold(), operator()(), and setThreshold().
1.5.6