Class Vertices
java.lang.Object
com.here.platform.location.inmemory.graph.Vertices
Methods for manipulating vertex directions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.here.platform.location.inmemory.graph.Direction
directionOf
(Vertex vertex) static com.here.platform.location.inmemory.graph.Direction
directionOf
(VertexIndex index) static Vertex
invertDirection
(Vertex vertex) Returns the vertex in the opposite direction of travel.static VertexIndex
invertDirection
(VertexIndex index) Calculate the index of the vertex associated with the same segment but pointing in the opposite direction fromindex
.static VertexIndex
toDirection
(VertexIndex index, com.here.platform.location.inmemory.graph.Direction direction) Invert the vertex direction forindex
, if necessary.static Vertex
toDirection
(Vertex vertex, com.here.platform.location.inmemory.graph.Direction direction) Invert the vertex direction forvertex
, if necessary.
-
Constructor Details
-
Vertices
public Vertices()
-
-
Method Details
-
directionOf
-
directionOf
-
toDirection
public static Vertex toDirection(Vertex vertex, com.here.platform.location.inmemory.graph.Direction direction) Invert the vertex direction forvertex
, if necessary. -
toDirection
public static VertexIndex toDirection(VertexIndex index, com.here.platform.location.inmemory.graph.Direction direction) Invert the vertex direction forindex
, if necessary. -
invertDirection
Calculate the index of the vertex associated with the same segment but pointing in the opposite direction fromindex
. -
invertDirection
Returns the vertex in the opposite direction of travel.Each topology segment is associated with two vertices, one for each direction. Given a vertex, that corresponds to a topology segment in a direction, this method returns the one in the opposite direction.
-