FST  openfst-1.7.5
OpenFst Library
Public Types | Public Member Functions | Public Attributes | List of all members
fst::internal::MPdtStack< StackId, Level, nlevels, restrict > Class Template Reference

#include <mpdt.h>

Collaboration diagram for fst::internal::MPdtStack< StackId, Level, nlevels, restrict >:
Collaboration graph
[legend]

Public Types

using Label = Level
 
using Config = StackConfig< StackId, Level, nlevels >
 
using ConfigToStackId = std::map< Config, StackId, CompConfig< StackId, Level, nlevels >>
 

Public Member Functions

 MPdtStack (const std::vector< std::pair< Label, Label >> &parens, const std::vector< Level > &assignments)
 
 MPdtStack (const MPdtStack &mstack)
 
 ~MPdtStack ()
 
StackId Find (StackId stack_id, Label label)
 
ssize_t Top (StackId stack_id) const
 
ssize_t ParenId (Label label) const
 
std::string PrintConfig (const Config &config) const
 
bool Error ()
 
StackId ExternalStackId (const Config &config)
 
const Config InternalStackIds (StackId stack_id) const
 
bool Empty (const Config &config, Level level) const
 
bool AllEmpty (const Config &config)
 

Public Attributes

bool error_
 
Label min_paren_
 
Label max_paren_
 
std::unordered_map< Label, Labelparen_levels_
 
std::vector< std::pair< Label, Label > > parens_
 
std::unordered_map< Label, size_t > paren_map_
 
std::unordered_map< KeyPair< Level >, size_t, KeyPairHasher< Level > > paren_id_map_
 
ConfigToStackId config_to_stack_id_map_
 
std::unordered_map< StackId, Configstack_id_to_config_map_
 
StackId next_stack_id_
 
PdtStack< StackId, Label > * stacks_ [nlevels]
 

Detailed Description

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
class fst::internal::MPdtStack< StackId, Level, nlevels, restrict >

Definition at line 102 of file mpdt.h.

Member Typedef Documentation

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
using fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::Config = StackConfig<StackId, Level, nlevels>

Definition at line 105 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
using fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::ConfigToStackId = std::map<Config, StackId, CompConfig<StackId, Level, nlevels>>

Definition at line 107 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
using fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::Label = Level

Definition at line 104 of file mpdt.h.

Constructor & Destructor Documentation

template<typename StackId , typename Level, Level nlevels, MPdtType restrict>
fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::MPdtStack ( const std::vector< std::pair< Label, Label >> &  parens,
const std::vector< Level > &  assignments 
)

Definition at line 219 of file mpdt.h.

template<typename StackId , typename Level, Level nlevels, MPdtType restrict>
fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::MPdtStack ( const MPdtStack< StackId, Level, nlevels, restrict > &  mstack)

Definition at line 275 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::~MPdtStack ( )
inline

Definition at line 114 of file mpdt.h.

Member Function Documentation

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
bool fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::AllEmpty ( const Config config)
inline

Definition at line 193 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
bool fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::Empty ( const Config config,
Level  level 
) const
inline

Definition at line 189 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
bool fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::Error ( )
inline

Definition at line 160 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
StackId fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::ExternalStackId ( const Config config)
inline

Definition at line 166 of file mpdt.h.

template<typename StackId, typename Level , Level nlevels, MPdtType restrict>
StackId fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::Find ( StackId  stack_id,
Label  label 
)

Definition at line 306 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
const Config fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::InternalStackIds ( StackId  stack_id) const
inline

Definition at line 181 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
ssize_t fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::ParenId ( Label  label) const
inline

Definition at line 142 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
std::string fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::PrintConfig ( const Config config) const
inline

Definition at line 148 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
ssize_t fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::Top ( StackId  stack_id) const
inline

Definition at line 125 of file mpdt.h.

Member Data Documentation

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
ConfigToStackId fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::config_to_stack_id_map_

Definition at line 211 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
bool fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::error_

Definition at line 200 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
Label fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::max_paren_

Definition at line 202 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
Label fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::min_paren_

Definition at line 201 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
StackId fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::next_stack_id_

Definition at line 213 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
std::unordered_map<KeyPair<Level>, size_t, KeyPairHasher<Level> > fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::paren_id_map_

Definition at line 209 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
std::unordered_map<Label, Label> fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::paren_levels_

Definition at line 204 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
std::unordered_map<Label, size_t> fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::paren_map_

Definition at line 206 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
std::vector<std::pair<Label, Label> > fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::parens_

Definition at line 205 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
std::unordered_map<StackId, Config> fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::stack_id_to_config_map_

Definition at line 212 of file mpdt.h.

template<typename StackId, typename Level, Level nlevels = 2, MPdtType restrict = MPDT_READ_RESTRICT>
PdtStack<StackId, Label>* fst::internal::MPdtStack< StackId, Level, nlevels, restrict >::stacks_[nlevels]

Definition at line 215 of file mpdt.h.


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