class GraphTile extends AnyRef
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 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.
- Alphabetic
- By Inheritance
- GraphTile
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
GraphTile(tileId: TileId, firstEdgeIndices: Array[Int], edges: Array[Int], externalVertexTileIds: Array[Long], externalVertexIndices: Array[Int])
- firstEdgeIndices
For every vertex, the index of its first edge. The value at a given index
v
corresponds to the index of the first edge that starts at the vertex in this partition with vertex indexv
- edges
For every edge, the index of its target vertex. The value at a given index
e
corresponds to the index of the target vertex of the edge with indexe
in this partition- externalVertexTileIds
The tile ID of each vertex in another tile that is the target of at least one edge starting at a vertex in this tile
- externalVertexIndices
The vertex index of each vertex in another tile that is the target of at least one edge starting at a vertex in this tile
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val edges: Array[Int]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
externalVertexCount: Int
The number of external vertices referenced by this GraphTile.
- val externalVertexIndices: Array[Int]
- val externalVertexTileIds: Array[Long]
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- val firstEdgeIndices: Array[Int]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
internalEdgeCount: Int
The number of edges whose source vertex belong to this GraphTile.
The number of edges whose source vertex belong to this GraphTile.
- Annotations
- @inline()
-
def
internalVertexCount: Int
The number of vertices that belong to this GraphTile.
The number of vertices that belong to this GraphTile.
- Annotations
- @inline()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val tileId: TileId
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
vertexCount: Int
The total number of internal and external Vertices in this GraphTile.
The total number of internal and external Vertices in this GraphTile.
- Annotations
- @inline()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()