CICERelative Class Reference

#include <CInformationCalculator.h>

Inheritance diagram for CICERelative:

CInformationCalculator

List of all members.

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

Private Attributes

double mSum
double mThreshold


Detailed Description

Definition at line 83 of file CInformationCalculator.h.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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.

00128                                  {
00129   return false;
00130 };

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 }


Member Data Documentation

double CICERelative::mSum [private]

double CICERelative::mThreshold [private]

Definition at line 87 of file CInformationCalculator.h.

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


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

Generated on Wed Jan 7 00:31:08 2009 for Gift by  doxygen 1.5.6