de.aitools.aq.graph.weighted
Interface UndirectedLongGraph

All Known Subinterfaces:
UndirectedMutableLongGraph
All Known Implementing Classes:
ConcreteUndirectedLongGraph

Deprecated. see package de.aitools.aq.structure.graph

public interface UndirectedLongGraph

An undirected weighted graph.

Version:
$Id: UndirectedLongGraph.java,v 1.2 2011/09/29 12:43:03 dogu3912 Exp $
Author:
johannes.kiesel(/\t)uni-weimar.de
See Also:
UndirectedMutableGraph

Nested Class Summary
static interface UndirectedLongGraph.Edge
          Deprecated. A possible edge connecting two vertices of an underlying UndirectedLongGraph.
 
Field Summary
static double DEFAULT_UNCONNECTED_WEIGHT
          Deprecated. The default weight for two not connected vertices.
 
Method Summary
 boolean containsEdge(long vertexA, long vertexB)
          Deprecated. Check if there exists an edge in the graph connecting the two vertices given as parameters.
 boolean containsVertex(long vertex)
          Deprecated. Check if given vertex is contained in the graph.
 java.util.Iterator<? extends UndirectedLongGraph.Edge> edges()
          Deprecated. Get an iterator over all edges of the graph.
 java.util.Iterator<? extends UndirectedLongGraph.Edge> edgesConnectedTo(long vertex)
          Deprecated. Get an iterator over all edges in the graph, given vertex is connected with.
 UndirectedLongGraph.Edge getEdge(long vertexA, long vertexB)
          Deprecated. Get the UndirectedLongGraph.Edge connecting the two vertices.
 double getEdgeWeight(long vertexA, long vertexB)
          Deprecated. Get the weight of the edge connecting the two vertices.
 double getUnconnectedWeight()
          Deprecated. The method getEdgeWeight(long, long) returns a double value for any possible edge connecting two vertices in the graph.
 int numEdges()
          Deprecated. Get the number of edges.
 int numEdges(long vertex)
          Deprecated.  
 int numVertices()
          Deprecated. Get the number of vertices.
 long[] vertices()
          Deprecated. Get an array containing all current vertices of this graph.
 long[] verticesConnectedTo(long vertex)
          Deprecated. Get an array containing all vertices that are connected with given vertex at the moment of this call.
 

Field Detail

DEFAULT_UNCONNECTED_WEIGHT

static final double DEFAULT_UNCONNECTED_WEIGHT
Deprecated. 
The default weight for two not connected vertices. If an edge was removed or simply not set yet, this should by default be it's weight.

See Also:
Constant Field Values
Method Detail

getUnconnectedWeight

double getUnconnectedWeight()
Deprecated. 
The method getEdgeWeight(long, long) returns a double value for any possible edge connecting two vertices in the graph. If an edge does not exist, the method will return this value.

Returns:
A weight for not existing edges.

numVertices

int numVertices()
Deprecated. 
Get the number of vertices.

Returns:
The number of vertices in the graph.

numEdges

int numEdges()
Deprecated. 
Get the number of edges.

Returns:
The number of edges in the graph.

numEdges

int numEdges(long vertex)
Deprecated. 
Parameters:
vertex - Which vertex to count edges of.
Returns:
The number of edges this vertex is connected with.
Throws:
java.util.NoSuchElementException - If the vertex is not part of the graph.

vertices

long[] vertices()
Deprecated. 
Get an array containing all current vertices of this graph.

Returns:
The array.
See Also:
numVertices()

verticesConnectedTo

long[] verticesConnectedTo(long vertex)
Deprecated. 
Get an array containing all vertices that are connected with given vertex at the moment of this call.

Parameters:
vertex - The vertex.
Returns:
The array.
Throws:
java.util.NoSuchElementException - If the vertex is not part of the graph.
See Also:
numEdges(long)

edges

java.util.Iterator<? extends UndirectedLongGraph.Edge> edges()
Deprecated. 
Get an iterator over all edges of the graph. Each edge is only visited once.

Returns:
The iterator.
See Also:
numEdges()

edgesConnectedTo

java.util.Iterator<? extends UndirectedLongGraph.Edge> edgesConnectedTo(long vertex)
Deprecated. 
Get an iterator over all edges in the graph, given vertex is connected with.

Parameters:
vertex - The vertex.
Returns:
The iterator.
Throws:
java.util.NoSuchElementException - If the vertex is not part of the graph.
See Also:
numEdges(long)

containsVertex

boolean containsVertex(long vertex)
Deprecated. 
Check if given vertex is contained in the graph.

Parameters:
vertex - The vertex to look for.
Returns:
True if the vertex is contained. False otherwise.

containsEdge

boolean containsEdge(long vertexA,
                     long vertexB)
Deprecated. 
Check if there exists an edge in the graph connecting the two vertices given as parameters.

Parameters:
vertexA - One vertex.
vertexB - The other vertex.
Returns:
True if both vertices are connected.
Throws:
java.util.NoSuchElementException - If at least one of the vertices is not part of the graph.

getEdgeWeight

double getEdgeWeight(long vertexA,
                     long vertexB)
Deprecated. 
Get the weight of the edge connecting the two vertices. This will return getUnconnectedWeight() if the two vertices are not connected.

Parameters:
vertexA - One vertex.
vertexB - The other vertex.
Returns:
The weight of the edge or getUnconnectedWeight().
Throws:
java.util.NoSuchElementException - If at least one of the vertices is not part of the graph.
See Also:
containsEdge(long, long), getEdge(long, long)

getEdge

UndirectedLongGraph.Edge getEdge(long vertexA,
                                 long vertexB)
Deprecated. 
Get the UndirectedLongGraph.Edge connecting the two vertices. The object will also be returned if there does not exists such an edge in the graph. Use UndirectedLongGraph.Edge.exists() to check.

Parameters:
vertexA - One vertex.
vertexB - The other vertex.
Returns:
The edge.
Throws:
java.util.NoSuchElementException - If at least one of the vertices is not part of the graph.
See Also:
containsEdge(long, long), getEdgeWeight(long, long)