Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends

alize::Distrib Class Reference

#include <Distrib.h>

Inheritance diagram for alize::Distrib:
Inheritance graph
[legend]
Collaboration diagram for alize::Distrib:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Distrib (unsigned long vectSize)
virtual const Distriboperator= (const Distrib &d)=0
virtual bool operator== (const Distrib &d) const =0
bool operator!= (const Distrib &d) const
virtual ~Distrib ()
Distribduplicate (const K &) const
virtual void reset ()=0
unsigned long getVectSize () const
real_t getMean (unsigned long index) const
DoubleVectorgetMeanVect ()
const DoubleVectorgetMeanVect () const
void setMean (real_t value, unsigned long index)
void setMeanVect (const DoubleVector &v)
virtual lk_t computeLK (const Feature &) const =0
virtual lk_t computeLK (const Feature &, unsigned long idx) const =0
real_t getCst () const
real_t getDet () const
virtual void computeAll ()=0
virtual String getClassName () const =0
virtual String toString () const =0
void setDet (const K &, const real_t v)
void setCst (const K &, const real_t v)
unsigned long & dictIndex (const K &)
unsigned long & refCounter (const K &)

Static Public Member Functions

static Distribcreate (const K &, const DistribType, unsigned long vectSize)

Protected Attributes

const unsigned long _vectSize
real_t _det
real_t _cst
DoubleVector _meanVect

Private Member Functions

virtual Distribclone () const =0

Private Attributes

unsigned long _refCounter
unsigned long _dictIndex

Friends

class TestDistribGD
class TestDistribGF
class TestMixtureGD
class TestMixtureGF
class TestMixtureServer
class TestDistribRefVector

Detailed Description

Abstract base class for all distribution classes.

Author:
Frederic Wils frederic.wils@lia.univ-avignon.fr
Version:
1.0
Date:
2003

Definition at line 81 of file Distrib.h.


Constructor & Destructor Documentation

D::Distrib ( unsigned long  vectSize )

Definition at line 67 of file Distrib.cpp.

D::~Distrib (  ) [virtual]

Definition at line 99 of file Distrib.cpp.


Member Function Documentation

virtual Distrib& alize::Distrib::clone (  ) const [private, pure virtual]

Implemented in alize::DistribGD, and alize::DistribGF.

virtual void alize::Distrib::computeAll (  ) [pure virtual]

Computes internal data (determinant of the matrix, inverse covariance and a constante used for likelihood computation)

Implemented in alize::DistribGD, and alize::DistribGF.

virtual lk_t alize::Distrib::computeLK ( const Feature  ) const [pure virtual]

Compute the likelihood between this distribution and a Feature object. The algorithm is implemented in the derived classes.

Returns:
the likelihood

Implemented in alize::DistribGD, and alize::DistribGF.

virtual lk_t alize::Distrib::computeLK ( const Feature ,
unsigned long  idx 
) const [pure virtual]

Implemented in alize::DistribGD, and alize::DistribGF.

Distrib & D::create ( const K ,
const DistribType  type,
unsigned long  vectSize 
) [static]
unsigned long & D::dictIndex ( const K  )

Definition at line 97 of file Distrib.cpp.

Distrib & D::duplicate ( const K  ) const

Reimplemented in alize::DistribGD, and alize::DistribGF.

Definition at line 73 of file Distrib.cpp.

String D::getClassName (  ) const [pure virtual]

Returns the name of the class

Returns:
the name of the class of the object as a String

Implements alize::Object.

Implemented in alize::DistribGD, and alize::DistribGF.

Definition at line 132 of file MixtureDict.cpp.

real_t D::getCst (  ) const

Returns the constante used to compute likelihood.

Returns:
the value of the constant

Definition at line 89 of file Distrib.cpp.

real_t D::getDet (  ) const

Returns the determinant of the matrix.

Returns:
the value of the determinant

Definition at line 87 of file Distrib.cpp.

real_t D::getMean ( unsigned long  index ) const

get a value in the mean vector

Parameters:
indexposition in the array
Returns:
the value of the mean
Exceptions:
IndexOutOfBoundsException

Definition at line 77 of file Distrib.cpp.

DoubleVector & D::getMeanVect (  )

Returns a reference to the mean vector

Returns:
a reference to the mean vector

Definition at line 79 of file Distrib.cpp.

const DoubleVector & D::getMeanVect (  ) const

Returns a constant reference to the mean vector

Returns:
a constant reference to the mean vector

Definition at line 81 of file Distrib.cpp.

unsigned long D::getVectSize (  ) const

Returns the size of the vectors/matrices

Returns:
the size of the vectors/matrices

Definition at line 75 of file Distrib.cpp.

Referenced by alize::MixtureGF::addDistrib(), alize::MixtureGD::addDistrib(), alize::DistribGD::operator=(), alize::MixtureGF::setDistrib(), and alize::MixtureGD::setDistrib().

bool D::operator!= ( const Distrib d ) const

Tests whether this distribution content is different from the d distribution content. This method uses the method operator=().

Parameters:
dthe distribution to compare with this one

Definition at line 71 of file Distrib.cpp.

virtual const Distrib& alize::Distrib::operator= ( const Distrib d ) [pure virtual]

Copy data members of a distribution in this distribution.

Parameters:
dthe distribution source
Returns:
this distribution as a generic distribution
Exceptions:
Exceptionsee sub-classes

Implemented in alize::DistribGD, and alize::DistribGF.

virtual bool alize::Distrib::operator== ( const Distrib d ) const [pure virtual]

Tests whether this distribution content is equal to the d distribution content. To know the meaning of "equals", see the same method in the derived classes.

Parameters:
dthe distribution to compare with this one

Implemented in alize::DistribGD, and alize::DistribGF.

unsigned long & D::refCounter ( const K  )
virtual void alize::Distrib::reset (  ) [pure virtual]

Reset the distribution. This is a pure virtual method. To know the exact meaning of 'reset', look at the overriden method in the derived classes

Implemented in alize::DistribGD, and alize::DistribGF.

void D::setCst ( const K ,
const real_t  v 
)

Sets the constante (internal usage)

Parameters:
vvalue of the constante

Definition at line 93 of file Distrib.cpp.

void D::setDet ( const K ,
const real_t  v 
)

Sets the determinant (internal usage)

Parameters:
vvalue of the determinant

Definition at line 91 of file Distrib.cpp.

void D::setMean ( real_t  value,
unsigned long  index 
)

Sets a value in the mean vector.

Parameters:
valuevalue to set
indexposition in the array
Exceptions:
IndexOutOfBoundsException

Definition at line 83 of file Distrib.cpp.

void D::setMeanVect ( const DoubleVector v )

Sets all the values in the mean vector.

Parameters:
vthe vector
Exceptions:
Exceptionif size of v is not equal to size of mean vector

Definition at line 85 of file Distrib.cpp.

String D::toString (  ) const [pure virtual]

This method is frequently overridden in the derived classes. If it is not, it returns the name of the class of the object and the address of the object

Returns:
a description of the object

Reimplemented from alize::Object.

Implemented in alize::DistribGD, and alize::DistribGF.

Definition at line 134 of file MixtureDict.cpp.

References alize::Mixture::getId(), alize::Object::toString(), and alize::String::valueOf().


Friends And Related Function Documentation

friend class TestDistribGD [friend]

Reimplemented in alize::DistribGD.

Definition at line 83 of file Distrib.h.

friend class TestDistribGF [friend]

Reimplemented in alize::DistribGF.

Definition at line 84 of file Distrib.h.

friend class TestDistribRefVector [friend]

Definition at line 88 of file Distrib.h.

friend class TestMixtureGD [friend]

Reimplemented in alize::DistribGD.

Definition at line 85 of file Distrib.h.

friend class TestMixtureGF [friend]

Reimplemented in alize::DistribGF.

Definition at line 86 of file Distrib.h.

friend class TestMixtureServer [friend]

Definition at line 87 of file Distrib.h.


Member Data Documentation

unsigned long alize::Distrib::_dictIndex [private]

Definition at line 210 of file Distrib.h.

unsigned long alize::Distrib::_refCounter [private]

Definition at line 209 of file Distrib.h.

const unsigned long alize::Distrib::_vectSize [protected]

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