lattice-utils-test.cc File Reference
Include dependency graph for lattice-utils-test.cc:

Go to the source code of this file.

Namespaces

 fst
 For an extended explanation of the framework of which grammar-fsts are a part, please see Support for grammars and graphs with on-the-fly parts. (i.e.
 

Functions

template<class Weight , class Int >
void TestConvert (bool invert)
 
template<class Weight , class Int >
void TestShortestPath ()
 
template<class Int >
void TestConvert2 ()
 
template<class Weight , class Int >
void TestConvertPair (bool invert)
 
template<class Weight , class Int >
void TestScalePair (bool invert)
 
int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 295 of file lattice-utils-test.cc.

References rnnlm::i.

295  {
296  using namespace fst;
297 
298  typedef ::int64 int64;
299  typedef ::uint64 uint64;
301  typedef ::uint32 uint32;
302 
303  {
305  for(int i = 0; i < 2; i++) {
306  bool invert = (i % 2);
307  TestConvert<TropicalWeight, int32>(invert);
308  TestConvertPair<LatticeWeight, int32>(invert);
309  TestConvertPair<LatticeWeight, size_t>(invert);
310  TestConvertPair<LexicographicWeight<TropicalWeight, TropicalWeight>, size_t>(invert);
311  TestScalePair<LatticeWeight, int32>(invert);
312  TestScalePair<LatticeWeight, size_t>(invert);
313  TestScalePair<LexicographicWeight<TropicalWeight, TropicalWeight>, size_t>(invert);
314  }
315  }
316  {
318  TestShortestPath<LatticeWeight, int32>();
319  TestConvert2<int32>();
320  for(int i = 0; i < 2; i++) {
321  bool invert = (i % 2);
322  TestConvertPair<LatticeWeight, int32>(invert);
323  TestConvertPair<LatticeWeight, size_t>(invert);
324  TestConvertPair<LexicographicWeight<TropicalWeight, TropicalWeight>, size_t>(invert);
325  TestScalePair<LatticeWeight, int32>(invert);
326  TestScalePair<LatticeWeight, size_t>(invert);
327  TestScalePair<LexicographicWeight<TropicalWeight, TropicalWeight>, size_t>(invert);
328  }
329  }
330  std::cout << "Tests succeeded\n";
331 }
For an extended explanation of the framework of which grammar-fsts are a part, please see Support for...
Definition: graph.dox:21
kaldi::int32 int32
LatticeWeightTpl< BaseFloat > LatticeWeight