public static int GraphDepth (IGraphNavigator graph, object startNode, DDepthAssigner da) { GraphDepthComputer gdc = new GraphDepthComputer(da); dfs(new object[]{startNode}, graph, null, new DNodeVisitor(gdc.BeginVisitor), new DNodeVisitor(gdc.EndVisitor)); return gdc.MaxDepth; }
public GraphDepthComputer(DDepthAssigner da) { this.da = da; }