public class NormalisedIntGraphImplQuadratic extends java.lang.Object implements NormalisedIntGraph
| Modifier and Type | Class and Description |
|---|---|
class |
NormalisedIntGraphImplQuadratic.EdgeIterator |
| Constructor and Description |
|---|
NormalisedIntGraphImplQuadratic() |
NormalisedIntGraphImplQuadratic(int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(int normalisedSource,
int normalisedTarget,
long weight)
Adds an edge.
|
NormalisedIntGraphImplQuadratic |
clone() |
boolean |
containsEdge(int normalisedSource,
int normalisedTarget)
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 normalisedNode)
Return an iterable of edgeIndex containing all edges of which v is a
source or a target.
|
int |
getEdgeSourceIndex(long edgeIndex)
Returns the vertex the edgeIndex comes from.
|
int |
getEdgeTargetIndex(long edgeIndex)
Returns the index of the vertex the edgeIndex points to.
|
long |
getEdgeWeight(int normalisedSource,
int normalisedTarget)
Returns the weight of an edge between source and target.
|
long |
getEdgeWeight(long edgeIndex)
Returns the weight of an edge.
|
EdgeIterable |
getIncomingEdgesOf(int normalisedNode)
Returns an array of edge index, containing all edges of which v is the
target.
|
EdgeIterable |
getOutgoingEdgesOf(int normalisedNode)
Returns an array of edge index, containing all edges of which v is the
source.
|
long |
getWeightOfHeaviestEdge()
Returns the weight of the edge with the highest weight.
|
java.lang.String |
toString() |
public NormalisedIntGraphImplQuadratic()
public NormalisedIntGraphImplQuadratic(int initialSize)
public void addEdge(int normalisedSource,
int normalisedTarget,
long weight)
NormalisedIntGraphaddEdge in interface NormalisedIntGraphpublic java.lang.Iterable<java.lang.Long> getEdges()
getEdges in interface NormalisedIntGraphpublic boolean containsEdge(int normalisedSource,
int normalisedTarget)
containsEdge in interface NormalisedIntGraphpublic int getEdgeSourceIndex(long edgeIndex)
NormalisedIntGraphgetEdgeSourceIndex in interface NormalisedIntGraphpublic int getEdgeTargetIndex(long edgeIndex)
NormalisedIntGraphgetEdgeTargetIndex in interface NormalisedIntGraphpublic long getEdgeWeight(long edgeIndex)
getEdgeWeight in interface NormalisedIntGraphedgeIndex - public long getEdgeWeight(int normalisedSource,
int normalisedTarget)
NormalisedIntGraphgetEdgeWeight in interface NormalisedIntGraphpublic EdgeIterable getIncomingEdgesOf(int normalisedNode)
NormalisedIntGraphgetIncomingEdgesOf in interface NormalisedIntGraphpublic EdgeIterable getOutgoingEdgesOf(int normalisedNode)
NormalisedIntGraphgetOutgoingEdgesOf in interface NormalisedIntGraphpublic java.lang.Iterable<java.lang.Long> getEdgesOf(int normalisedNode)
NormalisedIntGraphgetEdgesOf in interface NormalisedIntGraphpublic long getWeightOfHeaviestEdge()
getWeightOfHeaviestEdge in interface NormalisedIntGraphpublic NormalisedIntGraphImplQuadratic clone()
clone in interface NormalisedIntGraphclone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object