@SuppressWarnings("unchecked") private void pathSetShortestPath_facilitate(Node current, Path path, List<Path> paths) { Node source = graph.getNode(this.source_id); if (current != source) { Node next = null; ArrayList<? extends Edge> predecessors = (ArrayList<? extends Edge>) current .getAttribute(identifier+".predecessors"); while (current != source && predecessors.size() == 1) { Edge e = predecessors.get(0); next = e.getOpposite(current); path.add(current, e); current = next; predecessors = (ArrayList<? extends Edge>) current .getAttribute(identifier+".predecessors"); } if (current != source) { for (Edge e : predecessors) { Path p = path.getACopy(); p.add(current, e); pathSetShortestPath_facilitate(e.getOpposite(current), p, paths); } } } if (current == source) { paths.add(path); } }
@SuppressWarnings("unchecked") private void pathSetShortestPath_facilitate(Node current, Path path, List<Path> paths) { Node source = graph.getNode(this.source_id); if (current != source) { Node next = null; ArrayList<? extends Edge> predecessors = (ArrayList<? extends Edge>) current .getAttribute(identifier+".predecessors"); while (current != source && predecessors.size() == 1) { Edge e = predecessors.get(0); next = e.getOpposite(current); path.add(current, e); current = next; predecessors = (ArrayList<? extends Edge>) current .getAttribute(identifier+".predecessors"); } if (current != source) { for (Edge e : predecessors) { Path p = path.getACopy(); p.add(current, e); pathSetShortestPath_facilitate(e.getOpposite(current), p, paths); } } } if (current == source) { paths.add(path); } }