public PathCollection FindAllCycles() { MindFusion.LayoutSystem.PathList paths = MindFusion.LayoutSystem.PathFinder.FindAllCycles(graph); return(new PathCollection(paths)); }
internal PathCollection(MindFusion.LayoutSystem.PathList paths) { foreach (MindFusion.LayoutSystem.Path path in paths) { Add(new Path(path)); } }
/// <summary> /// Finds and returns all paths starting from node 'from' and /// ending at node 'to'. Returns empty collection if no /// path exists. /// </summary> public PathCollection FindAllPaths(Node from, Node to) { FCNode fromNode = null; FCNode toNode = null; foreach (FCNode node in graph.Nodes) { if (node.Node == from) { fromNode = node; } else if (node.Node == to) { toNode = node; } } MindFusion.LayoutSystem.PathList paths = MindFusion.LayoutSystem.PathFinder.FindAllPaths(graph, fromNode, toNode); return(new PathCollection(paths)); }