Package org.onebusaway.transit_data_federation.services.tripplanner

Examples of org.onebusaway.transit_data_federation.services.tripplanner.TransferNode


    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    TPDepartureVertex v = (TPDepartureVertex) obj;
    TransferNode a = _pathState.getNode();
    TransferNode b = v._pathState.getNode();
    return a.equals(b);
  }
View Full Code Here


    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    TPArrivalVertex v = (TPArrivalVertex) obj;
    TransferNode a = _pathState.getNode();
    TransferNode b = v._pathState.getNode();
    return a.equals(b);
  }
View Full Code Here

    if (v instanceof HasPathStateVertex) {
      HasPathStateVertex tpV = (HasPathStateVertex) v;

      TPState pathState = tpV.getPathState();
      TransferNode node = pathState.getNode();

      boolean isFromSourceStop = tpV.isDeparture() ^ pathState.isReverse();

      CoordinatePoint dest = new CoordinatePoint(target.getY(), target.getX());
      Set<TransferNode> visitedNodes = new HashSet<TransferNode>();
View Full Code Here

    visited.add(node);

    List<TransferParent> results = new ArrayList<TransferParent>();

    if (node.isExitAllowed()) {
      TransferNode extended = root.extendTree(node.getToStop(),
          node.getFromStop(), exitAllowed);
      results.add(extended);
    }

    for (TransferNode subNode : node.getTransfers()) {

      /**
       * There can be circular paths in the transfer tree. If we've already
       * visited the sub-node, we don't visit it again.
       */
      if (visited.contains(subNode))
        continue;

      List<TransferParent> parents = reverseTree(subNode, root, false, visited);

      for (TransferParent parent : parents) {
        TransferNode extended = parent.extendTree(node.getToStop(),
            node.getFromStop(), exitAllowed);
        results.add(extended);
      }
    }

View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.services.tripplanner.TransferNode

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.