package graph
- Alphabetic
- Public
- Protected
Type Members
- class DenseEntityPropertyTile extends EntityPropertyTile
- Annotations
- @Experimental()
- class DensePointBasedPropertyTile extends PointBasedPropertyTile
- Annotations
- @Experimental()
- class DenseRangeBasedPropertyTile extends RangeBasedPropertyTileV2
- Annotations
- @Experimental()
- sealed trait Direction extends AnyRef
Represents the direction of a com.here.platform.location.inmemory.graph.Vertex relative to the direction of its associated HERE Map Content segment.
- case class Edge(source: Vertex, index: EdgeIndex) extends Product with Serializable
Defines an edge in the routing graph, which corresponds to a transition from one vertex to another.
- final case class EdgeIndex(value: Int) extends AnyVal with Product with Serializable
Represents the index of an edge inside a graph partition.
- class EdgePropertyTile[T] extends AnyRef
Contains the edge property data for a single tile.
Contains the edge property data for a single tile.
EdgePropertyTile relies on the set of EdgeIndex values associated with the Edges in a tile. In a tile, each Edge has a different EdgeIndex value, and, if
#Edgesrepresents the number of Edges, the value of an EdgeIndex is between0and#Edges - 1.To save memory, EdgePropertyTile stores the edge properties in an array of size
#Edges, whose name isvalues. For each Edgee,values(e.index.value)contains the property that applies toe.See also
- GraphTile for more information about the representation of Edges in a tile
- TiledEdgePropertyMap, which is a PropertyMap[Edge, T] that retrieves edge attribute values from multiple EdgePropertyTiles.
- Note
Although this object contains an Array, you should treat it as immutable.
- sealed trait EntityPropertyTile extends AnyRef
- Annotations
- @Experimental()
- class GraphTile extends AnyRef
Contains the routing graph data for a single tile.
Contains the routing graph data for a single tile.
The graph topology is stored in compressed sparse row graph format. It also contains information on how the graph partitions are interconnected, i.e. graph edges from this tile to another.
Vertex indices 0 through
firstEdgeIndices.length - 2refer to internal vertices (vertices in this partition).The last entry of
firstEdgeIndicesis alwaysedges.length.Thus, each entry in
firstEdgeIndicesis the index of the edge after the last edge of the previous vertex.That means, the edges starting at a given internal vertex with index
idx, are determined by the index range fromfirstEdgeIndices(idx)(inclusive) tofirstEdgeIndices(idx + 1)(exclusive).Vertex indices
firstEdgeIndices.length - 1throughfirstEdgeIndices.length + externalVertexIndices.length - 2refer to external vertices (vertices outside this partition that are referred to from inside this partition).Therefore, the number of external vertices is
externalVertexIndices.length.When looking up a vertex
vwith indexidx:- If
idx < firstEdgeIndices.length - 1,vis in the current graph partition. - Otherwise,
vbelongs to the tile with IDexternalVertexTileIds(idx - firstEdgeIndices.length + 1)and its index in that partition isexternalVertexIndices(idx - firstEdgeIndices.length + 1).
See also
- TiledGraph
- The section on "The Compressed Sparse Row Format" in the Location Library developer guide
- Note
Although this object contains Arrays, you should treat it as immutable.
- If
- class MultiPropertyTile extends AnyRef
- Annotations
- @Experimental()
- class OverlappingRangeBasedPropertyTile[T] extends AnyRef
Contains the range-based property data for a single tile.
Contains the range-based property data for a single tile.
This tile accepts overlapping ranges, as long as they are ordered by their startOffset.
A range-based vertex property is a property that potentially applies to only a part of a vertex. The Location Library uses a start and end point to define the part of the vertex to which the range-based property applies. These start and end points are represented by their relative offsets on the Vertex (values between 0 and 1).
The storage format for these ranges contains two levels of information:
startIndices, and the triplets(startOffsets(j), endOffsets(j), values(j)).The triplets
(startOffsets(j), endOffsets(j), values(j))define the RangeBasedProperties for every Vertex that is contained in a partition.startIndicesindicates which RangeBasedProperty apply to a given Vertex. An indexiin0..startIndices.size-2corresponds to a VertexIndex and represents the index of a Vertex inside a partition. The RangeBasedProperties whose corresponding indicesjare betweenstartIndices(i)andstartIndices(i+1) - 1apply to the Vertexi.If
startIndices(i) == startIndices(i+1), Vertexihas no RangeBasedProperties.Note that the last value of
startIndicesdoes not correspond to any Vertex. This value must be equal tostartOffsets.length. This value allows calculating the RangeBasedProperties that apply to the last Vertex the same way as for all the other Vertices.- Note
Although this object contains Arrays, you should treat it as immutable.
- sealed trait PointBasedPropertyTile extends AnyRef
- Annotations
- @Experimental()
- class RangeBasedPropertyTile[T] extends AnyRef
Contains the range-based property data for a single tile.
Contains the range-based property data for a single tile.
This tile doesn't accept overlapping ranges.
A range-based vertex property is a property that potentially applies to only a part of a vertex. The Location Library uses a start and end point to define the part of the vertex to which the range-based property applies. These start and end points are represented by their relative offsets on the Vertex (values between 0 and 1).
The storage format for these ranges contains two levels of information:
startIndices, and the triplets(startOffsets(j), endOffsets(j), values(j)).The triplets
(startOffsets(j), endOffsets(j), values(j))define the RangeBasedProperties for every Vertex that is contained in a partition.startIndicesindicates which RangeBasedProperty apply to a given Vertex. An indexiin0..startIndices.size-2corresponds to a VertexIndex and represents the index of a Vertex inside a partition. The RangeBasedProperties whose corresponding indicesjare betweenstartIndices(i)andstartIndices(i+1) - 1apply to the Vertexi.If
startIndices(i) == startIndices(i+1), Vertexihas no RangeBasedProperties.Note that the last value of
startIndicesdoes not correspond to any Vertex. This value must be equal tostartOffsets.length. This value allows calculating the RangeBasedProperties that apply to the last Vertex the same way as for all the other Vertices.- Note
Although this object contains Arrays, you should treat it as immutable.
- sealed trait RangeBasedPropertyTileV2 extends AnyRef
- Annotations
- @Experimental()
- class ReverseGraphTile extends AnyRef
Contains the routing graph data for a single tile, needed to perform an efficient reverse expansion of a graph.
- case class SegmentIndex(value: Int) extends Product with Serializable
The Index of an undirected road segment in a GraphTile.
The Index of an undirected road segment in a GraphTile.
Each road segment corresponds to two Vertices, one for each Direction. A SegmentIndex, therefore, refers to a road segment without specifying a Direction, whereas a VertexIndex refers to a road segment but also specifies a Direction along that road segment.
- class SparseEntityPropertyTile extends EntityPropertyTile
- Annotations
- @Experimental()
- class SparsePointBasedPropertyTile extends PointBasedPropertyTile
- Annotations
- @Experimental()
- class SparseRangeBasedPropertyTile extends RangeBasedPropertyTileV2
- Annotations
- @Experimental()
- abstract class TiledEdgePropertyMap[T, U] extends PropertyMap[Edge, U]
A PropertyMap[Edge, T] that retrieves edge attribute values from multiple EdgePropertyTiles.
A PropertyMap[Edge, T] that retrieves edge attribute values from multiple EdgePropertyTiles.
For a given
edge, TiledEdgePropertyMap first usestileByIdto retrieve thepropertyTilethat has the same tile ID as the Edge source Vertex. Then, TiledEdgePropertyMap retrieves the attribute value from this EdgePropertyTile by callingpropertyTile.values(edge.index.value).If, for a given tile ID, the mapping function returns an EdgePropertyTile that has a different tile ID, apply throws a RuntimeException.
- class TiledGeometryPropertyMap extends PropertyMap[Vertex, PackedLineString]
Implements a PropertyMap for retrieving vertex geometries.
- class TiledGraph extends DirectedGraph[Vertex, Edge]
A Graph consisting of multiple GraphTiles.
- abstract class TiledOverlappingRangeBasedPropertyMap[T, U] extends PropertyMap[Vertex, Seq[RangeBasedProperty[U]]]
Unifies multiple OverlappingRangeBasedPropertyTiles, to enable using them transparently to look up property values by com.here.platform.location.inmemory.graph.Vertex.
Unifies multiple OverlappingRangeBasedPropertyTiles, to enable using them transparently to look up property values by com.here.platform.location.inmemory.graph.Vertex.
TiledOverlappingRangeBasedPropertyMap supports properties of type
Uthat are represented by a different typeTinside the underlying OverlappingRangeBasedPropertyTiles. In this case, property values are converted from one type to the other whenever they are retrieved.See also OverlappingTiledRangeBasedPropertyMap.transform
- T
Type of the property values inside the OverlappingRangeBasedPropertyTiles
- U
Type of the property values returned by this PropertyMap
- abstract class TiledRangeBasedPropertyMap[T, U] extends RangeBasedPropertyMap[Vertex, U]
Unifies multiple RangeBasedPropertyTiles, to enable using them transparently to look up property values by com.here.platform.location.inmemory.graph.Vertex.
Unifies multiple RangeBasedPropertyTiles, to enable using them transparently to look up property values by com.here.platform.location.inmemory.graph.Vertex.
TiledRangeBasedPropertyMap supports properties of type
Uthat are represented by a different typeTinside the underlying RangeBasedPropertyTiles. In this case, property values are converted from one type to the other whenever they are retrieved.See also TiledRangeBasedPropertyMap.transform
- T
Type of the property values inside the RangeBasedPropertyTiles
- U
Type of the property values returned by this RangeBasedPropertyMap
- class TiledReverseGraph extends DirectedGraph[Vertex, Edge]
A reverse Graph consisting of multiple GraphTiles.
A reverse Graph consisting of multiple GraphTiles.
The graph vertices and edges are compatible with the ones returned from the forward graph, so the two graphs can be used together in the same algorithm (e.g. bidirectional search).
- class TiledReversedGraph extends DirectedGraph[Vertex, Edge]
A reverse Graph consisting of multiple tiles.
A reverse Graph consisting of multiple tiles.
The graph vertices and edges are compatible with the ones returned from the forward graph, so the two graphs can be used together in the same algorithm (e.g. bidirectional search).
- Note
This implementation works by exploiting a property of a specific set of directed "edge based" graphs often used in road networks, whose vertices always have an inverse (
Vertices.invertDirection). For a more generic implementation of a reverse tiled graph see TiledReverseGraph.
- class TiledUndirectedPropertyMap[T] extends PropertyMap[Vertex, T]
A property map for properties that do not depend on the direction of a vertex (segment properties).
A property map for properties that do not depend on the direction of a vertex (segment properties).
See also UndirectedPropertyTile for details on the data format used by this class.
- Note
Undirected (i.e. Segment) properties have the same value for both vertices corresponding to a segment. Therefore, we can store a single value for both to reduce memory usage.
- class UnavailableEntityPropertyTile extends UnavailablePropertyTile with EntityPropertyTile
- Annotations
- @Experimental()
- class UnavailablePointBasedPropertyTile extends UnavailablePropertyTile with PointBasedPropertyTile
- Annotations
- @Experimental()
- class UnavailableRangeBasedPropertyTile extends UnavailablePropertyTile with RangeBasedPropertyTileV2
- Annotations
- @Experimental()
- class UndirectedPropertyTile[T] extends AnyRef
Contains the undirected property data for a single tile.
Contains the undirected property data for a single tile.
An undirected property applies to a whole road segment independently of direction. The length of a road segment is such an undirected property. This allows storing only one value per vertex pair instead of one value per vertex.
See also TiledUndirectedPropertyMap
- Note
Although this object contains Arrays, you should treat it as immutable.
- case class Vertex(tileId: TileId, index: VertexIndex) extends Product with Serializable
Defines a vertex
- final case class VertexIndex(value: Int) extends AnyVal with Product with Serializable
Represents the index of a vertex inside a graph partition.
- case class VertexRange(vertex: Vertex, start: Double, end: Double) extends Product with Serializable
Represents a continuous part of a vertex.
Represents a continuous part of a vertex.
- vertex
the vertex itself
- start
The start offset along the vertex. Must be in the range [0.0; 1.0]
- end
The end offset along the vertex. Must be in the range [start; 1.0]
Value Members
- case object Backward extends Direction with Product with Serializable
The vertex and the segment have opposite directions.
- object EmptyEntityPropertyTile extends EntityPropertyTile
- Annotations
- @Experimental()
- object EmptyPointBasedPropertyTile extends PointBasedPropertyTile
- Annotations
- @Experimental()
- object EmptyRangeBasedPropertyTile extends RangeBasedPropertyTileV2
- Annotations
- @Experimental()
- case object Forward extends Direction with Product with Serializable
The vertex and the segment have the same direction.
- object GraphTile
- object SegmentIndex extends Serializable
- object TiledEdgePropertyMap
- object TiledGraph
- object TiledRangeBasedPropertyMap
- object Vertices
Methods for manipulating vertex directions.