Ejemplo n.º 1
0
        public PathCollection FindAllCycles()
        {
            MindFusion.LayoutSystem.PathList paths =
                MindFusion.LayoutSystem.PathFinder.FindAllCycles(graph);

            return(new PathCollection(paths));
        }
Ejemplo n.º 2
0
 internal PathCollection(MindFusion.LayoutSystem.PathList paths)
 {
     foreach (MindFusion.LayoutSystem.Path path in paths)
     {
         Add(new Path(path));
     }
 }
Ejemplo n.º 3
0
        /// <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));
        }