21 #ifndef KALDI_NNET3_NNET_GRAPH_H_ 22 #define KALDI_NNET3_NNET_GRAPH_H_ 51 std::vector<std::vector<int32> > *graph);
60 void FindSccs(
const std::vector<std::vector<int32> > &graph,
61 std::vector<std::vector<int32> > *sccs);
67 bool GraphHasCycles(
const std::vector<std::vector<int32> > &graph);
72 void MakeSccGraph(
const std::vector<std::vector<int32> > &graph,
73 const std::vector<std::vector<int32> > &sccs,
74 std::vector<std::vector<int32> > *scc_graph);
84 std::vector<int32> *node_to_order);
89 std::vector<std::vector<int32> > *graph_transpose);
102 std::vector<int32> *node_to_epoch);
void NnetToDirectedGraph(const Nnet &nnet, std::vector< std::vector< int32 > > *graph)
This function takes an nnet and turns it to a directed graph on nodes.
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
void ComputeGraphTranspose(const std::vector< std::vector< int32 > > &graph, std::vector< std::vector< int32 > > *graph_transpose)
Outputs a graph in which the order of arcs is reversed.
bool GraphHasCycles(const std::vector< std::vector< int32 > > &graph)
This function returns 'true' if the graph represented in 'graph' contains cycles (including cycles wh...
void ComputeTopSortOrder(const std::vector< std::vector< int32 > > &graph, std::vector< int32 > *node_to_order)
Given an acyclic graph (where each std::vector<int32> is a list of destination-nodes of arcs coming f...
void ComputeNnetComputationEpochs(const Nnet &nnet, std::vector< int32 > *node_to_epoch)
This function computes the order in which we need to compute each node in the graph, where each node-index n maps to an epoch-index t = 0, 1, ...
void FindSccs(const std::vector< std::vector< int32 > > &graph, std::vector< std::vector< int32 > > *sccs)
Given a directed graph (where each std::vector<int32> is a list of destination-nodes of arcs coming f...
void MakeSccGraph(const std::vector< std::vector< int32 > > &graph, const std::vector< std::vector< int32 > > &sccs, std::vector< std::vector< int32 > > *scc_graph)
Given a list of sccs of a graph (e.g.
std::string PrintGraphToString(const std::vector< std::vector< int32 > > &graph)
Prints a graph to a string in a pretty way for human readability, e.g.