| Modifier and Type | Class and Description |
|---|---|
class |
IntGraphImplQuadratic.EdgeIterator |
| Constructor and Description |
|---|
IntGraphImplQuadratic() |
IntGraphImplQuadratic(int initialSize) |
| 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.
|
IntGraphImplQuadratic |
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 that have a weight greater
than 0; 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.
|
EdgeIterable |
getIncomingEdgesOf(int node)
Returns an array of edge index, containing all edges of which v is the
target.
|
EdgeIterable |
getIncomingEdgesOfIndex(int index) |
int |
getNodeOfIndex(int index)
The graph keeps an index of nodes.
|
int[] |
getNodes() |
int |
getNumberOfNodes() |
EdgeIterable |
getOutgoingEdgesOf(int node)
Returns an array of edge index, containing all edges of which v is the
source.
|
EdgeIterable |
getOutgoingEdgesOfIndex(int index) |
long |
getWeightOfHeaviestEdge()
Returns the weight of the edge with the highest weight.
|
java.lang.String |
toString() |
public IntGraphImplQuadratic()
public IntGraphImplQuadratic(int initialSize)
public void addEdge(int source,
int target,
long weight)
IntGraphpublic java.lang.Iterable<java.lang.Long> getEdges()
public boolean containsEdge(int source,
int target)
containsEdge in interface IntGraphpublic int getEdgeSource(long edgeIndex)
IntGraphgetEdgeSource in interface IntGraphpublic int getEdgeSourceIndex(long edgeIndex)
getEdgeSourceIndex in interface IntGraphpublic int getEdgeTarget(long edgeIndex)
IntGraphgetEdgeTarget in interface IntGraphpublic int getEdgeTargetIndex(long edgeIndex)
IntGraphgetEdgeTargetIndex in interface IntGraphpublic long getEdgeWeight(long edgeIndex)
getEdgeWeight in interface IntGraphedgeIndex - public long getEdgeWeight(int source,
int target)
IntGraphgetEdgeWeight in interface IntGraphpublic EdgeIterable getIncomingEdgesOf(int node)
IntGraphgetIncomingEdgesOf in interface IntGraphpublic EdgeIterable getIncomingEdgesOfIndex(int index)
getIncomingEdgesOfIndex in interface IntGraphpublic EdgeIterable getOutgoingEdgesOf(int node)
IntGraphgetOutgoingEdgesOf in interface IntGraphpublic EdgeIterable getOutgoingEdgesOfIndex(int index)
getOutgoingEdgesOfIndex in interface IntGraphpublic java.lang.Iterable<java.lang.Long> getEdgesOf(int node)
IntGraphgetEdgesOf in interface IntGraphpublic long getWeightOfHeaviestEdge()
getWeightOfHeaviestEdge in interface IntGraphpublic IntGraphImplQuadratic clone()
public void addNode(int node)
IntGraphpublic int[] getNodes()
public int getNumberOfNodes()
getNumberOfNodes in interface IntGraphpublic int getNodeOfIndex(int index)
IntGraphgetNodeOfIndex in interface IntGraphpublic java.lang.String toString()
toString in class java.lang.Object