public final class GraphParms
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
GraphParms(int[] index,
int[] edges)
Constructs a graph topology information object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getEdge(int i)
Returns the edge
i. |
int |
getEdgeCount()
Returns the number of edges.
|
int |
getIndex(int i)
Returns the index of the node
i. |
int |
getIndexCount()
Returns the number of nodes.
|
protected GraphParms(int[] index,
int[] edges)
index - node degrees.edges - graph edges.public int getIndexCount()
public int getIndex(int i)
i.
getIndex(0) returns the degree of the node 0, and
getIndex(i)-getIndex(i-1) is the degree of the node i.
i - position of the node.public int getEdgeCount()
public int getEdge(int i)
i.
The list of neighbors of node zero is stored in getEdge(j),
for 0 ≤ j ≤ getIndex(0)-1 and the list
of neighbors of node i, i > 0, is stored
in getEdge(j), getIndex(i-1) ≤ j ≤
getIndex(i)-1.
i - index of the edge.