Package nz.ac.waikato.jdsl.core.api

Examples of nz.ac.waikato.jdsl.core.api.Sequence


    // Sequence, stepping back along the path until we find the Vertex
    // that closed the cycle.
    //
    // If no cycle is found, the Sequence will be empty and the cycle
    // Iterator will be empty
    Sequence theCycle = new NodeSequence();
    ObjectIterator pathVerts = prospectiveCycle_.elements();
    while (pathVerts.hasNext()) {
      Vertex v = (Vertex)pathVerts.nextObject();
      theCycle.insertFirst(v);
      if (v == cycleStart_) {
  break;
      }
    }
    // remove all decorations added during the DFS
    cleanup();
    // get ready to return the cycle.
    cycleIterator_ = theCycle.elements();
  }


    // Sequence, stepping back along the path until we find the Vertex
    // that closed the cycle.
    //
    // If no cycle is found, the Sequence will be empty and the cycle
    // Iterator will be empty
    Sequence theCycle = new NodeSequence();
    ObjectIterator pathVerts = prospectiveCycle_.elements();
    while (pathVerts.hasNext()) {
      Vertex v = (Vertex)pathVerts.nextObject();
      theCycle.insertFirst(v);
      if (v == cycleStart_) {
  break;
      }
    }
    // remove all decorations added during the DFS
    cleanup();
    // get ready to return the cycle.
    cycleIterator_ = theCycle.elements();
  }

TOP

Related Classes of nz.ac.waikato.jdsl.core.api.Sequence

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.