CICEntropyWithThreshold Class Reference

#include <CInformationCalculator.h>

Inheritance diagram for CICEntropyWithThreshold:

CInformationCalculator

List of all members.

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 CInformationCalculatorsubClone () const

Private Attributes

double mMaximum
double mThreshold


Detailed Description

Definition at line 57 of file CInformationCalculator.h.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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]

Reimplemented from CInformationCalculator.

Definition at line 77 of file CInformationCalculator.cc.

00077                                             {
00078   return false;
00079 };

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.

00085                                                             {
00086   mMaximum=max(mMaximum,
00087          inValue);
00088 };

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 }


Member Data Documentation

Definition at line 61 of file CInformationCalculator.h.

Referenced by CICEntropyWithThreshold(), operator()(), and setThreshold().


The documentation for this class was generated from the following files:

Generated on Tue Jan 6 00:31:11 2009 for Gift by  doxygen 1.5.6