Class RangeBasedPropertyTile<T>

java.lang.Object
com.here.platform.location.inmemory.graph.RangeBasedPropertyTile<T>

public class RangeBasedPropertyTile<T> extends Object
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.
  • Constructor Details

    • RangeBasedPropertyTile

      public RangeBasedPropertyTile(TileId tileId, int[] firstRangeIndices, double[] startOffsets, double[] endOffsets, Object values)
  • Method Details

    • endOffsets

      public double[] endOffsets()
    • firstRangeIndices

      public int[] firstRangeIndices()
    • startOffsets

      public double[] startOffsets()
    • tileId

      public TileId tileId()
    • values

      public Object values()