de.aitools.aq.graph.weighted
Interface UndirectedIntGraph

All Known Subinterfaces:
UndirectedMutableIntGraph
All Known Implementing Classes:
ConcreteUndirectedIntGraph

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

public interface UndirectedIntGraph

An undirected weighted graph.

Version:
$Id: UndirectedIntGraph.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 UndirectedIntGraph.Edge
          Deprecated. A possible edge connecting two vertices of an underlying UndirectedIntGraph.
 
Field Summary
static double DEFAULT_UNCONNECTED_WEIGHT
          Deprecated. The default weight for two not connected vertices.
 
Method Summary
 boolean containsEdge(int vertexA, int vertexB)
          Deprecated. Check if there exists an edge in the graph connecting the two vertices given as parameters.
 boolean containsVertex(int vertex)
          Deprecated. Check if given vertex is contained in the graph.
 java.util.Iterator<? extends UndirectedIntGraph.Edge> edges()
          Deprecated. Get an iterator over all edges of the graph.
 java.util.Iterator<? extends UndirectedIntGraph.Edge> edgesConnectedTo(int vertex)
          Deprecated. Get an iterator over all edges in the graph, given vertex is connected with.
 UndirectedIntGraph.Edge getEdge(int vertexA, int vertexB)
          Deprecated. Get the UndirectedIntGraph.Edge connecting the two vertices.
 double getEdgeWeight(int vertexA, int vertexB)
          Deprecated. Get the weight of the edge connecting the two vertices.
 double getUnconnectedWeight()
          Deprecated. The method getEdgeWeight(int, int) returns a double value for any possible edge connecting two vertices in the graph.
 int numEdges()
          Deprecated. Get the number of edges.
 int numEdges(int vertex)
          Deprecated.  
 int numVertices()
          Deprecated. Get the number of vertices.
 int[] vertices()
          Deprecated. Get an array containing all current vertices of this graph.
 int[] verticesConnectedTo(int 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(int, int) 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(int 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

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

Returns:
The array.
See Also:
numVertices()

verticesConnectedTo

int[] verticesConnectedTo(int 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(int)

edges

java.util.Iterator<? extends UndirectedIntGraph.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 UndirectedIntGraph.Edge> edgesConnectedTo(int 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(int)

containsVertex

boolean containsVertex(int 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(int vertexA,
                     int 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(int vertexA,
                     int 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(int, int), getEdge(int, int)

getEdge

UndirectedIntGraph.Edge getEdge(int vertexA,
                                int vertexB)
Deprecated. 
Get the UndirectedIntGraph.Edge connecting the two vertices. The object will also be returned if there does not exists such an edge in the graph. Use UndirectedIntGraph.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(int, int), getEdgeWeight(int, int)