public interface IntGraph
extends java.lang.Cloneable
Modifier and Type | Method and Description |
---|---|
void |
addEdge(int Source,
int Target,
long weight)
Adds an edge.
|
void |
addNode(int node)
Adds a node to the graph.
|
IntGraph |
clone() |
boolean |
containsEdge(int source,
int target)
Returns whether the graph contains an edge between source and target.
|
java.lang.Iterable<java.lang.Long> |
getEdges()
Gives an iterable that iterates over all edges; The edges that are
returned are indices.
|
java.lang.Iterable<java.lang.Long> |
getEdgesOf(int node)
Return an iterable of edgeIndex containing all edges of which v is a
source or a target.
|
int |
getEdgeSource(long edgeIndex)
Returns the node the edgeIndex comes from.
|
int |
getEdgeSourceIndex(long edgeIndex) |
int |
getEdgeTarget(long edgeIndex)
Returns the node the edgeIndex points to.
|
int |
getEdgeTargetIndex(long edgeIndex)
Returns the index of the node the edgeIndex points to.
|
long |
getEdgeWeight(int Source,
int Target)
Returns the weight of an edge between source and target.
|
long |
getEdgeWeight(long edgeIndex)
Returns the weight of an edge.
|
java.lang.Iterable<java.lang.Long> |
getIncomingEdgesOf(int Node)
Returns an array of edge index, containing all edges of which v is the
target.
|
EdgeIterable |
getIncomingEdgesOfIndex(int v) |
int |
getNodeOfIndex(int index)
The graph keeps an index of nodes.
|
int[] |
getNodes() |
int |
getNumberOfNodes() |
java.lang.Iterable<java.lang.Long> |
getOutgoingEdgesOf(int Node)
Returns an array of edge index, containing all edges of which v is the
source.
|
EdgeIterable |
getOutgoingEdgesOfIndex(int v) |
long |
getWeightOfHeaviestEdge()
Returns the weight of the edge with the highest weight.
|
void addNode(int node)
node
- int[] getNodes()
void addEdge(int Source, int Target, long weight)
Source
- Target
- weight
- java.lang.Iterable<java.lang.Long> getEdges()
boolean containsEdge(int source, int target)
int getEdgeSource(long edgeIndex)
edgeIndex
- int getEdgeTarget(long edgeIndex)
edgeIndex
- int getEdgeTargetIndex(long edgeIndex)
edgeIndex
- long getEdgeWeight(int Source, int Target)
Source
- Target
- java.lang.Iterable<java.lang.Long> getIncomingEdgesOf(int Node)
Node
- java.lang.Iterable<java.lang.Long> getOutgoingEdgesOf(int Node)
Node
- java.lang.Iterable<java.lang.Long> getEdgesOf(int node)
node
- long getWeightOfHeaviestEdge()
long getEdgeWeight(long edgeIndex)
edgeIndex
- IntGraph clone()
int getNumberOfNodes()
int getNodeOfIndex(int index)
index
- int getEdgeSourceIndex(long edgeIndex)
EdgeIterable getOutgoingEdgesOfIndex(int v)
EdgeIterable getIncomingEdgesOfIndex(int v)