Interface IntAdjacencyGraph<VertexIndex, EdgeProps, Props>
Type Parameters
-
VertexIndex extends number
-
-
Props = any
Properties
Readonly
a
Readonly
b
Readonly
edgeCount
edgeCount: number
Readonly
edgeProps
Readonly
offset
Optional
Readonly
props
props?: Props
Readonly
vertexCount
vertexCount: number
Methods
getDirectedEdgeIndex
- getDirectedEdgeIndex(i: VertexIndex, j: VertexIndex): number
-
Parameters
-
i: VertexIndex
-
j: VertexIndex
Returns number
getEdgeIndex
- getEdgeIndex(i: VertexIndex, j: VertexIndex): number
-
Parameters
-
i: VertexIndex
-
j: VertexIndex
Returns number
getVertexEdgeCount
- getVertexEdgeCount(i: VertexIndex): number
-
Returns number
Represent a graph using vertex adjacency list.
Edges of the i-th vertex are stored in the arrays a and b for indices in the range [offset[i], offset[i+1]).
Edge properties are indexed same as in the arrays a and b.