Examples of cycleNodes()


Examples of ptolemy.graph.DirectedAcyclicGraph.cycleNodes()

        // NOTE: The following may be a very costly test, which is why
        // it is done at the end.  However, this means that we cannot
        // report an actor in the directed cycle.  Probably DirectedGraph
        // should be modified to enable such reporting.
        if (!dag.isAcyclic()) {
            Object[] cycleNodes = dag.cycleNodes();
            StringBuffer names = new StringBuffer();

            for (int i = 0; i < cycleNodes.length; i++) {
                if (cycleNodes[i] instanceof Nameable) {
                    if (i > 0) {
View Full Code Here

Examples of ptolemy.graph.DirectedAcyclicGraph.cycleNodes()

        // First make sure that there is no causality loop of arithmetic
        // actors. This makes the graph reachability algorithms terminate.
        DirectedAcyclicGraph arithmeticGraph = _toGraph(arithmeticActors);

        if (!arithmeticGraph.isAcyclic()) {
            Object[] cycleNodes = arithmeticGraph.cycleNodes();
            LinkedList nodesAsList = new LinkedList();
            StringBuffer inCycle = new StringBuffer("Cycle includes: ");
            for (int i = 0; i < cycleNodes.length; i++) {
                inCycle.append(((NamedObj) cycleNodes[i]).getFullName());
                if (i < cycleNodes.length - 1) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.