void NHPYLMFst::InitArcIterator(NHPYLMFst::StateId s, fst::ArcIteratorData< fst::LogArc > *data) const { data->base = NULL; if (s != FinalContextId) { data->arcs = GetArcs(s); data->narcs = NumArcs(s); } else { data->narcs = 0; data->arcs = NULL; } data->ref_count = NULL; }
int main() { /* Define the Graph */ int Size; Size = GetSize( GRAPH_DATA ); Graph G; G = MakeGraph( Size ); /* Append Arcs */ GetArcs(G, GRAPH_DATA); /* Print Graph */ PrintGraph(G); /* Topological Sort */ VertexType *Degree; Degree = InDegree(G); puts("\nDepth First Topological Sort"); DfsTopSort(Degree, G); return 0; }