public static class CombineWayAction.NodeGraph extends Object
Modifier and Type | Field and Description |
---|---|
private Set<CombineWayAction.NodePair> |
edges |
private int |
numUndirectedEges |
private Map<Node,List<CombineWayAction.NodePair>> |
predecessors |
private Map<Node,List<CombineWayAction.NodePair>> |
successors |
Constructor and Description |
---|
NodeGraph()
Constructs a new
NodeGraph . |
private Set<CombineWayAction.NodePair> edges
private int numUndirectedEges
private Map<Node,List<CombineWayAction.NodePair>> successors
private Map<Node,List<CombineWayAction.NodePair>> predecessors
public NodeGraph()
NodeGraph
.public static List<CombineWayAction.NodePair> buildNodePairs(Way way, boolean directed)
public static List<CombineWayAction.NodePair> buildNodePairs(List<Way> ways, boolean directed)
public static List<CombineWayAction.NodePair> eliminateDuplicateNodePairs(List<CombineWayAction.NodePair> pairs)
public static CombineWayAction.NodeGraph createDirectedGraphFromNodePairs(List<CombineWayAction.NodePair> pairs)
public static CombineWayAction.NodeGraph createDirectedGraphFromWays(Collection<Way> ways)
public static CombineWayAction.NodeGraph createUndirectedGraphFromNodeList(List<CombineWayAction.NodePair> pairs)
public static CombineWayAction.NodeGraph createUndirectedGraphFromNodeWays(Collection<Way> ways)
protected void rememberSuccessor(CombineWayAction.NodePair pair)
protected void rememberPredecessors(CombineWayAction.NodePair pair)
protected boolean isTerminalNode(Node n)
protected void prepare()
public void add(CombineWayAction.NodePair pair)
public void add(List<CombineWayAction.NodePair> pairs)
protected Node getStartNode()
protected Set<Node> getTerminalNodes()
protected Set<Node> getNodes(Stack<CombineWayAction.NodePair> pairs)
protected List<CombineWayAction.NodePair> getOutboundPairs(CombineWayAction.NodePair pair)
protected List<CombineWayAction.NodePair> getOutboundPairs(Node node)
protected boolean isSpanningWay(Stack<CombineWayAction.NodePair> way)
protected List<Node> buildPathFromNodePairs(Stack<CombineWayAction.NodePair> path)
protected List<Node> buildSpanningPath(Node startNode)
startNode
.
Traverses the path in depth-first order.startNode
- the start nodepublic List<Node> buildSpanningPath()