src/lstm/recodebeam.cpp
void RecodeBeamSearch::ExtractPath(
    const RecodeNode *node, std::vector<const RecodeNode *> *path) const {
  path->clear();
  while (node != nullptr) {
    path->push_back(node);
    node = node->prev;
  }
  std::reverse(path->begin(), path->end());
}
// Helper backtracks through the lattice from the given node, storing the
// path and reversing it.
Helper backtracks through the lattice from the given node, storing the
path and reversing it.
Helper backtracks through the lattice from the given node storing the path and reversing it .
void RecodeBeamSearch::ExtractPath(
    const RecodeNode *node, std::vector<const RecodeNode *> *path) const {
  path->clear();
  while (node != nullptr) {
    path->push_back(node);
    node = node->prev;
  }
  std::reverse(path->begin(), path->end());
}
void RecodeBeamSearch :: ExtractPath ( const RecodeNode * node , std :: vector < const RecodeNode * > * path ) const { path -> clear ( ) ; while ( node != nullptr ) { path -> push_back ( node ) ; node = node -> prev ; } std :: reverse ( path -> begin ( ) , path -> end ( ) ) ; }
Helper backtracks through the lattice from the given node, storing the
path and reversing it.
Helper backtracks through the lattice from the given node storing the path and reversing it .