Package de.timefinder.algo.graph

Examples of de.timefinder.algo.graph.SimpleTree$MainNode


            // can change while the search. This is the reason for this separate
            // search. Now we construct the path.

            // The following tree contains only the y nodes!
            // The corresponding x node can simply be retrieved from the matching.
            SimpleTree augmentatingTree = new SimpleTree();
            Set<Integer> yNeighbors = eqSubGraph.getX(u);
            augmentatingTree.setRoots(yNeighbors);
            int tmpX;

            // TODO do we need setS or setT here?
            while (!yNeighbors.contains(y)) {
                for (int tmpY : yNeighbors) {
                    if (matching.getY(tmpY).size() > 0) {
                        tmpX = matching.getY(tmpY).iterator().next();
                        augmentatingTree.addBranches(tmpY, eqSubGraph.getX(tmpX));
                    }
                }

                augmentatingTree.higher();
                yNeighbors = augmentatingTree.getNeighbors();
            }

            // ... and swap the matching along the this path
            // => extended matching (one more edge).
            boolean ret;
            int currentX, currentY;
            int lastY = y;
            Iterator<Integer> augmentingIter = augmentatingTree.getToRootIterator(y);

            while (augmentingIter.hasNext()) {
                currentY = augmentingIter.next();
                Set<Integer> matchedX = matching.getY(currentY);
                assert matchedX.size() == 1;
View Full Code Here

TOP

Related Classes of de.timefinder.algo.graph.SimpleTree$MainNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.