public class State extends Object
A Observation can either be at an undirected real (tower) node or at a directed virtual node.
If this is at a directed virtual node then incoming paths from any previous State
should arrive through getIncomingVirtualEdge() and outgoing paths to any following
State should start with getOutgoingVirtualEdge(). This is achieved by
penalizing other edges for routing. Note that virtual nodes are always connected to their
adjacent nodes via 2 virtual edges (not counting reverse virtual edges).
| Constructor and Description |
|---|
State(Observation entry,
com.graphhopper.storage.index.QueryResult queryResult)
Creates an undirected candidate for a real node.
|
State(Observation entry,
com.graphhopper.storage.index.QueryResult queryResult,
com.graphhopper.routing.querygraph.VirtualEdgeIteratorState incomingVirtualEdge,
com.graphhopper.routing.querygraph.VirtualEdgeIteratorState outgoingVirtualEdge)
Creates a directed candidate for a virtual node.
|
| Modifier and Type | Method and Description |
|---|---|
Observation |
getEntry() |
com.graphhopper.util.EdgeIteratorState |
getIncomingVirtualEdge()
Returns the virtual edge that should be used by incoming paths.
|
com.graphhopper.util.EdgeIteratorState |
getOutgoingVirtualEdge()
Returns the virtual edge that should be used by outgoing paths.
|
com.graphhopper.storage.index.QueryResult |
getQueryResult() |
boolean |
isOnDirectedEdge()
Returns whether this State is directed.
|
String |
toString() |
public State(Observation entry, com.graphhopper.storage.index.QueryResult queryResult)
public State(Observation entry, com.graphhopper.storage.index.QueryResult queryResult, com.graphhopper.routing.querygraph.VirtualEdgeIteratorState incomingVirtualEdge, com.graphhopper.routing.querygraph.VirtualEdgeIteratorState outgoingVirtualEdge)
public Observation getEntry()
public com.graphhopper.storage.index.QueryResult getQueryResult()
public boolean isOnDirectedEdge()
public com.graphhopper.util.EdgeIteratorState getIncomingVirtualEdge()
IllegalStateException - if this State is not directed.public com.graphhopper.util.EdgeIteratorState getOutgoingVirtualEdge()
IllegalStateException - if this State is not directed.Copyright © 2012–2020. All rights reserved.