CQueryNormalizer Class Reference

#include <CQueryNormalizer.h>

Inheritance diagram for CQueryNormalizer:

CQNBestFullyWeighted CQNEuclideanLengthSquare CQNMaxDocumentFrequency CQNNoNormalization CQNSquareDFLogICFSum

List of all members.

Public Member Functions

 CQueryNormalizer (const CAcInvertedFile *inAccessor=0)
void setAccessor (const CAcInvertedFile *inAccessor)
virtual void reset ()
virtual double getValue () const
 Translating the information into a normalizing value in the end.
virtual void considerQueryFeature (const CWeightingFunction &inFeature)
 Considers a feature.
virtual CQueryNormalizerclone () const

Protected Attributes

double mValue
const CAcInvertedFilemAccessor


Detailed Description

For normalizing weights like in Salton/Buckley we need to now all the features in the query or all the features in a document. This base class is supposed to handle both.

For getting additional information it needs to know the accessor.

Definition at line 55 of file CQueryNormalizer.h.


Constructor & Destructor Documentation

CQueryNormalizer::CQueryNormalizer ( const CAcInvertedFile inAccessor = 0  ) 

Definition at line 53 of file CQueryNormalizer.cc.

References reset().

00053                                                                    :
00054   mAccessor(inAccessor){
00055     reset();
00056 };


Member Function Documentation

void CQueryNormalizer::setAccessor ( const CAcInvertedFile inAccessor  ) 

Definition at line 72 of file CQueryNormalizer.cc.

References mAccessor.

Referenced by CWeighter::setAccessor().

00072                                                                    {
00073   mAccessor=
00074     inAccessor;
00075 };

void CQueryNormalizer::reset (  )  [virtual]

Definition at line 90 of file CQueryNormalizer.cc.

References mValue.

Referenced by CQueryNormalizer().

00090                             {
00091   mValue=0;
00092 }

double CQueryNormalizer::getValue (  )  const [virtual]

Translating the information into a normalizing value in the end.

Reimplemented in CQNNoNormalization.

Definition at line 107 of file CQueryNormalizer.cc.

References mValue.

Referenced by CWeightingFunction::applyOnThis(), and CWFBestFullyWeighted::subApply().

00107                                       {
00108   return mValue;
00109 }

void CQueryNormalizer::considerQueryFeature ( const CWeightingFunction inFeature  )  [virtual]

Considers a feature.

Reimplemented in CQNBestFullyWeighted, CQNEuclideanLengthSquare, CQNMaxDocumentFrequency, CQNNoNormalization, and CQNSquareDFLogICFSum.

Definition at line 124 of file CQueryNormalizer.cc.

References THIS_SHOULD_NEVER_BE_CALLED.

Referenced by CQInvertedFile::buildNormalizedQueryHash().

00125                         {
00126 #define THIS_SHOULD_NEVER_BE_CALLED 0
00127   assert(THIS_SHOULD_NEVER_BE_CALLED);
00128 };

CQueryNormalizer * CQueryNormalizer::clone (  )  const [virtual]

clone: This permits us to store completely preconfiguered normalizers and use them when needed

modification history

Reimplemented in CQNBestFullyWeighted, CQNEuclideanLengthSquare, CQNMaxDocumentFrequency, CQNNoNormalization, and CQNSquareDFLogICFSum.

Definition at line 95 of file CQNBestFullyWeighted.cc.

Referenced by CWeighter::clone().

00095                                                   {
00096     return new CQNBestFullyWeighted(*this);
00097 }


Member Data Documentation

double CQueryNormalizer::mValue [protected]

Definition at line 72 of file CQueryNormalizer.h.

Referenced by CQNSquareDFLogICFSum::considerQueryFeature(), and setAccessor().


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

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