Packages

package graph

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. 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.

  2. 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.

    Defines an edge in the routing graph, which corresponds to a transition from one vertex to another.

    source

    A source Vertex

    index

    The index of this Edge in the tile

  3. final case class EdgeIndex(value: Int) extends AnyVal with Product with Serializable

    Represents the index of an edge inside a graph partition.

  4. 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 #Edges represents the number of Edges, the value of an EdgeIndex is between 0 and #Edges - 1.

    To save memory, EdgePropertyTile stores the edge properties in an array of size #Edges, whose name is values. For each Edge e, values(e.index.value) contains the property that applies to e.

    See also

    Note

    Although this object contains an Array, you should treat it as immutable.

  5. 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 - 2 refer to internal vertices (vertices in this partition).

    The last entry of firstEdgeIndices is always edges.length.

    Thus, each entry in firstEdgeIndices is 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 from firstEdgeIndices(idx) (inclusive) to firstEdgeIndices(idx + 1) (exclusive).

    Vertex indices firstEdgeIndices.length - 1 through firstEdgeIndices.length + externalVertexIndices.length - 2 refer 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 v with index idx:

    • If idx < firstEdgeIndices.length - 1, v is in the current graph partition.
    • Otherwise, v belongs to the tile with ID externalVertexTileIds(idx - firstEdgeIndices.length + 1) and its index in that partition is externalVertexIndices(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.

  6. 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.

    startIndices indicates which RangeBasedProperty apply to a given Vertex. An index i in 0..startIndices.size-2 corresponds to a VertexIndex and represents the index of a Vertex inside a partition. The RangeBasedProperties whose corresponding indices j are between startIndices(i) and startIndices(i+1) - 1 apply to the Vertex i.

    If startIndices(i) == startIndices(i+1), Vertex i has no RangeBasedProperties.

    Note that the last value of startIndices does not correspond to any Vertex. This value must be equal to startOffsets.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.

  7. 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.

    startIndices indicates which RangeBasedProperty apply to a given Vertex. An index i in 0..startIndices.size-2 corresponds to a VertexIndex and represents the index of a Vertex inside a partition. The RangeBasedProperties whose corresponding indices j are between startIndices(i) and startIndices(i+1) - 1 apply to the Vertex i.

    If startIndices(i) == startIndices(i+1), Vertex i has no RangeBasedProperties.

    Note that the last value of startIndices does not correspond to any Vertex. This value must be equal to startOffsets.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.

  8. class ReverseGraphTile extends AnyRef

    Contains the routing graph data for a single tile, needed to perform an efficient reverse expansion of a graph.

  9. 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.

  10. 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 uses tileById to retrieve the propertyTile that has the same tile ID as the Edge source Vertex. Then, TiledEdgePropertyMap retrieves the attribute value from this EdgePropertyTile by calling propertyTile.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.

  11. class TiledGeometryPropertyMap extends PropertyMap[Vertex, PackedLineString]

    Implements a PropertyMap for retrieving vertex geometries.

  12. class TiledGraph extends DirectedGraph[Vertex, Edge]

    A Graph consisting of multiple GraphTiles.

  13. 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 U that are represented by a different type T inside 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

  14. 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 U that are represented by a different type T inside 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

  15. 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).

  16. 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.

  17. 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.

  18. 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.

  19. case class Vertex(tileId: TileId, index: VertexIndex) extends Product with Serializable

    Defines a vertex

    Defines a vertex

    tileId

    The tile containing this Vertex

    index

    The index of this Vertex in the tile

  20. final case class VertexIndex(value: Int) extends AnyVal with Product with Serializable

    Represents the index of a vertex inside a graph partition.

  21. 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

  1. object Backward extends Direction with Product with Serializable

    The vertex and the segment have opposite directions.

  2. object Forward extends Direction with Product with Serializable

    The vertex and the segment have the same direction.

  3. object GraphTile
  4. object SegmentIndex extends Serializable
  5. object TiledEdgePropertyMap
  6. object TiledGraph
  7. object TiledRangeBasedPropertyMap
  8. object Vertices

    Methods for manipulating vertex directions.

Ungrouped