protected void generateNodePath (N startNode, GraphPath<N> outPath) { // Work back along the path, accumulating nodes // outPath.clear(); while (current.connection != null) { outPath.add(current.node); current = nodeRecords[graph.getIndex(current.connection.getFromNode())]; } outPath.add(startNode); // Reverse the path outPath.reverse(); }
protected void generateConnectionPath (N startNode, GraphPath<Connection<N>> outPath) { // Work back along the path, accumulating connections // outPath.clear(); while (current.node != startNode) { outPath.add(current.connection); current = nodeRecords[graph.getIndex(current.connection.getFromNode())]; } // Reverse the path outPath.reverse(); }
protected void generateNodePath (N startNode, GraphPath<N> outPath) { // Work back along the path, accumulating nodes // outPath.clear(); while (current.connection != null) { outPath.add(current.node); current = nodeRecords[graph.getIndex(current.connection.getFromNode())]; } outPath.add(startNode); // Reverse the path outPath.reverse(); }
protected void generateConnectionPath (N startNode, GraphPath<Connection<N>> outPath) { // Work back along the path, accumulating connections // outPath.clear(); while (current.node != startNode) { outPath.add(current.connection); current = nodeRecords[graph.getIndex(current.connection.getFromNode())]; } // Reverse the path outPath.reverse(); }