HmmTopology::HmmState Struct Reference

A structure defined inside HmmTopology to represent a HMM state. More...

#include <hmm-topology.h>

Collaboration diagram for HmmTopology::HmmState:

Public Member Functions

 HmmState (int32 pdf_class)
 
 HmmState (int32 forward_pdf_class, int32 self_loop_pdf_class)
 
bool operator== (const HmmState &other) const
 
 HmmState ()
 

Public Attributes

int32 forward_pdf_class
 The Pdf-classes forward-pdf-class, typically 0, 1 or 2 (the same as the HMM-state index), but may be different to enable us to hardwire sharing of state, and may be equal to kNoPdf == -1 in order to specify nonemitting states (unusual). More...
 
int32 self_loop_pdf_class
 The Pdf-classes self-loop pdf-class, similar to Pdf-classes forward-pdf-class. More...
 
std::vector< std::pair< int32, BaseFloat > > transitions
 A list of transitions, indexed by what we call a 'transition-index'. More...
 

Detailed Description

A structure defined inside HmmTopology to represent a HMM state.

Definition at line 96 of file hmm-topology.h.

Constructor & Destructor Documentation

◆ HmmState() [1/3]

HmmState ( int32  pdf_class)
inlineexplicit

Definition at line 111 of file hmm-topology.h.

111  {
112  this->forward_pdf_class = pdf_class;
113  this->self_loop_pdf_class = pdf_class;
114  }
int32 forward_pdf_class
The Pdf-classes forward-pdf-class, typically 0, 1 or 2 (the same as the HMM-state index)...
Definition: hmm-topology.h:100
int32 self_loop_pdf_class
The Pdf-classes self-loop pdf-class, similar to Pdf-classes forward-pdf-class.
Definition: hmm-topology.h:104

◆ HmmState() [2/3]

HmmState ( int32  forward_pdf_class,
int32  self_loop_pdf_class 
)
inlineexplicit

Definition at line 115 of file hmm-topology.h.

References HmmTopology::HmmState::forward_pdf_class, KALDI_ASSERT, and HmmTopology::HmmState::self_loop_pdf_class.

115  {
120  }
static const int32 kNoPdf
A constant used in the HmmTopology class as the pdf-class kNoPdf, which is used when a HMM-state is n...
Definition: hmm-topology.h:86
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:185
int32 forward_pdf_class
The Pdf-classes forward-pdf-class, typically 0, 1 or 2 (the same as the HMM-state index)...
Definition: hmm-topology.h:100
int32 self_loop_pdf_class
The Pdf-classes self-loop pdf-class, similar to Pdf-classes forward-pdf-class.
Definition: hmm-topology.h:104

◆ HmmState() [3/3]

HmmState ( )
inline

Definition at line 128 of file hmm-topology.h.

int32 forward_pdf_class
The Pdf-classes forward-pdf-class, typically 0, 1 or 2 (the same as the HMM-state index)...
Definition: hmm-topology.h:100
int32 self_loop_pdf_class
The Pdf-classes self-loop pdf-class, similar to Pdf-classes forward-pdf-class.
Definition: hmm-topology.h:104

Member Function Documentation

◆ operator==()

bool operator== ( const HmmState other) const
inline

Definition at line 122 of file hmm-topology.h.

References HmmTopology::HmmState::forward_pdf_class, HmmTopology::HmmState::self_loop_pdf_class, and HmmTopology::HmmState::transitions.

122  {
123  return (forward_pdf_class == other.forward_pdf_class &&
124  self_loop_pdf_class == other.self_loop_pdf_class &&
125  transitions == other.transitions);
126  }
std::vector< std::pair< int32, BaseFloat > > transitions
A list of transitions, indexed by what we call a &#39;transition-index&#39;.
Definition: hmm-topology.h:109
int32 forward_pdf_class
The Pdf-classes forward-pdf-class, typically 0, 1 or 2 (the same as the HMM-state index)...
Definition: hmm-topology.h:100
int32 self_loop_pdf_class
The Pdf-classes self-loop pdf-class, similar to Pdf-classes forward-pdf-class.
Definition: hmm-topology.h:104

Member Data Documentation

◆ forward_pdf_class

int32 forward_pdf_class

The Pdf-classes forward-pdf-class, typically 0, 1 or 2 (the same as the HMM-state index), but may be different to enable us to hardwire sharing of state, and may be equal to kNoPdf == -1 in order to specify nonemitting states (unusual).

Definition at line 100 of file hmm-topology.h.

Referenced by kaldi::GeneratePathThroughHmm(), HmmTopology::HmmState::HmmState(), and HmmTopology::HmmState::operator==().

◆ self_loop_pdf_class

int32 self_loop_pdf_class

The Pdf-classes self-loop pdf-class, similar to Pdf-classes forward-pdf-class.

They will either both be kNoPdf, or neither be kNoPdf.

Definition at line 104 of file hmm-topology.h.

Referenced by HmmTopology::HmmState::HmmState(), and HmmTopology::HmmState::operator==().

◆ transitions

std::vector<std::pair<int32, BaseFloat> > transitions

A list of transitions, indexed by what we call a 'transition-index'.

The first member of each pair is the index of the next HmmState, and the second is the default transition probability (before training).

Definition at line 109 of file hmm-topology.h.

Referenced by TransitionModel::ComputeDerived(), kaldi::GeneratePathThroughHmm(), HmmTopology::MinLength(), and HmmTopology::HmmState::operator==().


The documentation for this struct was generated from the following file: