DecodableSumScaled Class Reference

#include <decodable-sum.h>

Inheritance diagram for DecodableSumScaled:
Collaboration diagram for DecodableSumScaled:

Public Member Functions

 DecodableSumScaled (DecodableInterface *d1, BaseFloat w1, DecodableInterface *d2, BaseFloat w2, BaseFloat scale)
 
 DecodableSumScaled (const std::vector< std::pair< DecodableInterface *, BaseFloat > > &decodables, BaseFloat scale)
 
virtual BaseFloat LogLikelihood (int32 frame, int32 state_index)
 Returns the log likelihood, which will be negated in the decoder. More...
 
- Public Member Functions inherited from DecodableSum
 DecodableSum (DecodableInterface *d1, BaseFloat w1, DecodableInterface *d2, BaseFloat w2)
 
 DecodableSum (const std::vector< std::pair< DecodableInterface *, BaseFloat > > &decodables)
 
void CheckSizes () const
 
virtual int32 NumIndices () const
 Returns the number of states in the acoustic model (they will be indexed one-based, i.e. More...
 
virtual bool IsLastFrame (int32 frame) const
 Returns true if this is the last frame. More...
 
- Public Member Functions inherited from DecodableInterface
virtual int32 NumFramesReady () const
 The call NumFramesReady() will return the number of frames currently available for this decodable object. More...
 
virtual ~DecodableInterface ()
 

Private Member Functions

 KALDI_DISALLOW_COPY_AND_ASSIGN (DecodableSumScaled)
 

Private Attributes

BaseFloat scale_
 

Detailed Description

Definition at line 86 of file decodable-sum.h.

Constructor & Destructor Documentation

◆ DecodableSumScaled() [1/2]

DecodableSumScaled ( DecodableInterface d1,
BaseFloat  w1,
DecodableInterface d2,
BaseFloat  w2,
BaseFloat  scale 
)
inline

Definition at line 88 of file decodable-sum.h.

91  : DecodableSum(d1, w1, d2, w2), scale_(scale) {}
DecodableSum(DecodableInterface *d1, BaseFloat w1, DecodableInterface *d2, BaseFloat w2)
Definition: decodable-sum.h:40

◆ DecodableSumScaled() [2/2]

DecodableSumScaled ( const std::vector< std::pair< DecodableInterface *, BaseFloat > > &  decodables,
BaseFloat  scale 
)
inline

Definition at line 93 of file decodable-sum.h.

95  : DecodableSum(decodables), scale_(scale) {}
DecodableSum(DecodableInterface *d1, BaseFloat w1, DecodableInterface *d2, BaseFloat w2)
Definition: decodable-sum.h:40

Member Function Documentation

◆ KALDI_DISALLOW_COPY_AND_ASSIGN()

KALDI_DISALLOW_COPY_AND_ASSIGN ( DecodableSumScaled  )
private

◆ LogLikelihood()

virtual BaseFloat LogLikelihood ( int32  frame,
int32  index 
)
inlinevirtual

Returns the log likelihood, which will be negated in the decoder.

The "frame" starts from zero. You should verify that NumFramesReady() > frame before calling this.

Reimplemented from DecodableSum.

Definition at line 97 of file decodable-sum.h.

References DecodableSum::LogLikelihood().

97  {
98  return scale_ * DecodableSum::LogLikelihood(frame, state_index);
99  }
virtual BaseFloat LogLikelihood(int32 frame, int32 state_index)
Returns the log likelihood, which will be negated in the decoder.
Definition: decodable-sum.h:63

Member Data Documentation

◆ scale_

BaseFloat scale_
private

Definition at line 102 of file decodable-sum.h.


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