Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ClusterRep Class Reference

Generic vector space representation for a cluster or document. More...

#include <ClusterRep.hpp>

List of all members.

Public Methods

 ClusterRep (const Index &ind)
 Empty rep.

 ClusterRep (DOCID_T did, const Index &ind)
 Rep for given document id.

 ClusterRep (TermInfoList *tList, const Index &ind)
 Rep for given TermInfoList.

 ClusterRep (vector< DOCID_T > &dids, const Index &ind)
 Rep for given vector of document ids.

 ClusterRep (FloatFreqVector *v, const Index &ind)
 Rep for the given vector.

 ClusterRep (const ClusterRep *old)
 Copy constructor.

virtual ~ClusterRep ()
 clean up.

virtual void normalize ()
double sum2 () const
 sum of the squared elements in the vector.

FloatFreqVectorgetRep () const
 This should not be exposed...

void weigh (const double *vals)
void weigh (double val)
void addVal (int id, double val)
void addTerms (const vector< TERMID_T > &tids)
void addVec (const ClusterRep *v2)
void subtract (const ClusterRep *v2)
double dotProd (const ClusterRep *v2) const
 computes dot product between two reps.


Detailed Description

Generic vector space representation for a cluster or document.


Constructor & Destructor Documentation

ClusterRep::ClusterRep const Index   ind [inline]
 

Empty rep.

ClusterRep::ClusterRep DOCID_T    did,
const Index   ind
 

Rep for given document id.

ClusterRep::ClusterRep TermInfoList   tList,
const Index   ind
 

Rep for given TermInfoList.

ClusterRep::ClusterRep vector< DOCID_T > &    dids,
const Index   ind
 

Rep for given vector of document ids.

ClusterRep::ClusterRep FloatFreqVector   v,
const Index   ind
 

Rep for the given vector.

ClusterRep::ClusterRep const ClusterRep *    old
 

Copy constructor.

ClusterRep::~ClusterRep   [virtual]
 

clean up.


Member Function Documentation

void ClusterRep::addTerms const vector< TERMID_T > &    tids [inline]
 

add 1 to each element in the vector specified in tids. Destructively modifies the vector

void ClusterRep::addVal int    id,
double    val
[inline]
 

add val to each element in the vector. Destructively modifies the vector

void ClusterRep::addVec const ClusterRep *    v2 [inline]
 

adds vector to rep. Destructively modifies the vector

double ClusterRep::dotProd const ClusterRep *    v2 const [inline]
 

computes dot product between two reps.

FloatFreqVector* ClusterRep::getRep   const [inline]
 

This should not be exposed...

void ClusterRep::normalize   [virtual]
 

divide each element by the square root of the sum of the squared elements in the vector.

void ClusterRep::subtract const ClusterRep *    v2 [inline]
 

subtracts vector from rep. Destructively modifies the vector

double ClusterRep::sum2   const [inline]
 

sum of the squared elements in the vector.

void ClusterRep::weigh double    val [inline]
 

multiply each element by val. Destructively modifies the vector

void ClusterRep::weigh const double *    vals [inline]
 

multiply each element by the corresponding entry in vals. Destructively modifies the vector


The documentation for this class was generated from the following files:
Generated on Wed Nov 3 12:59:27 2004 for Lemur Toolkit by doxygen1.2.18