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

alize::ViterbiAccum Class Reference

#include <ViterbiAccum.h>

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

List of all members.

Public Member Functions

void addState (Mixture &m)
real_tlogTransition (unsigned long i1, unsigned long i2)
real_t logTransition (unsigned long i1, unsigned long i2) const
MixturegetState (unsigned long i) const
unsigned long getStateCount () const
void reset ()
void computeAndAccumulate (const Feature &f, double llkW=0)
void computeAndAccumulate (FeatureServer &fs, unsigned long start, unsigned long count, double fudge)
void computeAndAccumulate (FeatureServer &fs, DoubleVector &llk, unsigned long start, unsigned long count)
void computeAndAccumulate (const Feature &f, double fudge, double penality)
unsigned long getFeatureCount () const
const ULongVectorgetPath ()
real_t getLlp () const
virtual String getClassName () const
virtual String toString () const
virtual ~ViterbiAccum ()

Static Public Member Functions

static ViterbiAccumcreate (StatServer &, const Config &, const K &)

Private Member Functions

lk_t computeStateLLK (unsigned long stateIndex, const Feature &) const
 ViterbiAccum (StatServer &, const Config &)
 ViterbiAccum (const ViterbiAccum &)
const ViterbiAccumoperator= (const ViterbiAccum &c)
bool operator== (const ViterbiAccum &c) const
bool operator!= (const ViterbiAccum &c) const

Private Attributes

const Config_pConfig
RefVector< Mixture_stateVect
DoubleVector _transMatrix
DoubleVector _llpVect
DoubleVector _tmpLLKVect
DoubleVector _tmpllpVect
ULongVector _tmpTab
unsigned long _featureCount
ULongVector _path
bool _pathDefined
real_t _llp
bool _llpDefined
StatServer_pStatServer

Friends

class TestViterbiAccum

Detailed Description

Class used to determine the Viterbi path. Only the Stat server can create this king of object

<FRANCAIS>Le modele ergodique est sans constrainte : toutes les transitions d'un etat vers l'autre sont possibles

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

Definition at line 95 of file ViterbiAccum.h.


Constructor & Destructor Documentation

ViterbiAccum::~ViterbiAccum (  ) [virtual]

Definition at line 528 of file ViterbiAccum.cpp.

ViterbiAccum::ViterbiAccum ( StatServer ss,
const Config c 
) [private]

Definition at line 72 of file ViterbiAccum.cpp.

References reset().

Referenced by create().

alize::ViterbiAccum::ViterbiAccum ( const ViterbiAccum  ) [private]

Member Function Documentation

void ViterbiAccum::addState ( Mixture m )

Adds a state (a mixture)

Parameters:
mthe mixture to add

Definition at line 83 of file ViterbiAccum.cpp.

References _stateVect, _transMatrix, alize::RefVector< T >::addObject(), alize::RealVector< T >::setSize(), and alize::RefVector< T >::size().

void ViterbiAccum::computeAndAccumulate ( FeatureServer fs,
unsigned long  start,
unsigned long  count,
double  fudge 
)
void ViterbiAccum::computeAndAccumulate ( FeatureServer fs,
DoubleVector llk,
unsigned long  start,
unsigned long  count 
)
void ViterbiAccum::computeAndAccumulate ( const Feature f,
double  fudge,
double  penality 
)
void ViterbiAccum::computeAndAccumulate ( const Feature f,
double  llkW = 0 
)
lk_t ViterbiAccum::computeStateLLK ( unsigned long  stateIndex,
const Feature f 
) const [private]
ViterbiAccum & ViterbiAccum::create ( StatServer ss,
const Config c,
const K  
) [static]

Definition at line 75 of file ViterbiAccum.cpp.

References alize::Object::assertMemoryIsAllocated(), and ViterbiAccum().

String ViterbiAccum::getClassName (  ) const [virtual]

Returns the name of the class

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

Implements alize::Object.

Definition at line 499 of file ViterbiAccum.cpp.

unsigned long ViterbiAccum::getFeatureCount (  ) const

Returns the number of features accumulated

Definition at line 450 of file ViterbiAccum.cpp.

References _featureCount.

real_t ViterbiAccum::getLlp (  ) const

Returns the maximum log-probability value. You must call getPath() beforehand to compute the value

Exceptions:
Exceptionif the value is not computed

Definition at line 482 of file ViterbiAccum.cpp.

References _llp, and _llpDefined.

const ULongVector & ViterbiAccum::getPath (  )

Computes and returns the Viterbi path

Returns:
the path (a constant reference to an ULongVector object)

Definition at line 452 of file ViterbiAccum.cpp.

References _featureCount, _llp, _llpDefined, _llpVect, _path, _pathDefined, _stateVect, _tmpTab, alize::Object::max(), alize::ULongVector::setSize(), and alize::RefVector< T >::size().

Mixture & ViterbiAccum::getState ( unsigned long  i ) const

Returns the state (Mixture object) of index i

Parameters:
iindex
Returns:
a reference to the Mixture object
Exceptions:
IndexOutOfBoundException

Definition at line 103 of file ViterbiAccum.cpp.

References _stateVect, and alize::RefVector< T >::getObject().

unsigned long ViterbiAccum::getStateCount (  ) const

Returns the number of states

Returns:
the number of states

Definition at line 106 of file ViterbiAccum.cpp.

References _stateVect, and alize::RefVector< T >::size().

Referenced by toString().

real_t & ViterbiAccum::logTransition ( unsigned long  i1,
unsigned long  i2 
)

Sets or gets a log-probability transition between two states

Parameters:
i1index of the first state
i2index of the second state
Returns:
a reference to the value of the log-probability
Exceptions:
IndexOutOfBoundException

Definition at line 90 of file ViterbiAccum.cpp.

References _stateVect, _transMatrix, and alize::RefVector< T >::size().

Referenced by computeAndAccumulate(), logTransition(), and toString().

real_t ViterbiAccum::logTransition ( unsigned long  i1,
unsigned long  i2 
) const

Definition at line 100 of file ViterbiAccum.cpp.

References logTransition().

bool alize::ViterbiAccum::operator!= ( const ViterbiAccum c ) const [private]

not implemented

const ViterbiAccum& alize::ViterbiAccum::operator= ( const ViterbiAccum c ) [private]

not implemented

bool alize::ViterbiAccum::operator== ( const ViterbiAccum c ) const [private]

not implemented

void ViterbiAccum::reset (  )

Resets the accumulators

Definition at line 114 of file ViterbiAccum.cpp.

References _featureCount, _llpDefined, _llpVect, _pathDefined, _tmpTab, alize::RealVector< T >::clear(), and alize::ULongVector::clear().

Referenced by ViterbiAccum().

String ViterbiAccum::toString (  ) const [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.

Definition at line 501 of file ViterbiAccum.cpp.

References _featureCount, _llp, _llpDefined, _path, _pathDefined, getStateCount(), logTransition(), and alize::String::valueOf().


Friends And Related Function Documentation

friend class TestViterbiAccum [friend]

Definition at line 97 of file ViterbiAccum.h.


Member Data Documentation

unsigned long alize::ViterbiAccum::_featureCount [private]

Definition at line 198 of file ViterbiAccum.h.

Referenced by computeAndAccumulate(), getFeatureCount(), getPath(), reset(), and toString().

Definition at line 202 of file ViterbiAccum.h.

Referenced by getLlp(), getPath(), and toString().

Definition at line 203 of file ViterbiAccum.h.

Referenced by computeAndAccumulate(), getLlp(), getPath(), reset(), and toString().

Definition at line 194 of file ViterbiAccum.h.

Referenced by computeAndAccumulate(), getPath(), and reset().

Definition at line 200 of file ViterbiAccum.h.

Referenced by getPath(), and toString().

Definition at line 201 of file ViterbiAccum.h.

Referenced by computeAndAccumulate(), getPath(), reset(), and toString().

Definition at line 189 of file ViterbiAccum.h.

Definition at line 204 of file ViterbiAccum.h.

Referenced by computeStateLLK().

Definition at line 195 of file ViterbiAccum.h.

Referenced by computeAndAccumulate().

Definition at line 196 of file ViterbiAccum.h.

Referenced by computeAndAccumulate().

Definition at line 197 of file ViterbiAccum.h.

Referenced by computeAndAccumulate(), getPath(), and reset().

Definition at line 192 of file ViterbiAccum.h.

Referenced by addState(), and logTransition().


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