de.aitools.aq.graph.weighted
Interface UndirectedMutableIntGraph

All Superinterfaces:
UndirectedIntGraph
All Known Implementing Classes:
ConcreteUndirectedIntGraph

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

public interface UndirectedMutableIntGraph
extends UndirectedIntGraph

An extension of an UndirectedIntGraph. The graph can be changed after it was created.

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

Nested Class Summary
static interface UndirectedMutableIntGraph.Edge
          Deprecated. The extension of UndirectedIntGraph.Edge to be mutable.
 
Field Summary
 
Fields inherited from interface de.aitools.aq.graph.weighted.UndirectedIntGraph
DEFAULT_UNCONNECTED_WEIGHT
 
Method Summary
 boolean addVertex(int vertex)
          Deprecated. Add a vertex to the graph.
 java.util.Iterator<? extends UndirectedMutableIntGraph.Edge> edges()
          Deprecated. Get an iterator over all edges of the graph.
 java.util.Iterator<? extends UndirectedMutableIntGraph.Edge> edgesConnectedTo(int vertex)
          Deprecated. Get an iterator over all edges in the graph, given vertex is connected with.
 UndirectedMutableIntGraph.Edge getEdge(int vertexA, int vertexB)
          Deprecated. Get the UndirectedIntGraph.Edge connecting the two vertices.
 double removeEdge(int vertexA, int vertexB)
          Deprecated. Remove a edge determined by two vertices.
 boolean removeVertex(int vertex)
          Deprecated. Remove a vertex from the graph.
 double setEdgeWeight(int vertexA, int vertexB, double weight)
          Deprecated. Set the weight of a edge determined by two vertices.
 void setUnconnectedWeight(double unconnectedWeight)
          Deprecated. Change the weight that is returned by UndirectedIntGraph.getEdgeWeight(int, int) if the two vertices are not connected.
 
Methods inherited from interface de.aitools.aq.graph.weighted.UndirectedIntGraph
containsEdge, containsVertex, getEdgeWeight, getUnconnectedWeight, numEdges, numEdges, numVertices, vertices, verticesConnectedTo
 

Method Detail

setUnconnectedWeight

void setUnconnectedWeight(double unconnectedWeight)
Deprecated. 
Change the weight that is returned by UndirectedIntGraph.getEdgeWeight(int, int) if the two vertices are not connected. This will remove all edges that currently have unconnectedWeight as their weight.

Parameters:
unconnectedWeight - The new weight for unconnected vertices.

edges

java.util.Iterator<? extends UndirectedMutableIntGraph.Edge> edges()
Deprecated. 
Description copied from interface: UndirectedIntGraph
Get an iterator over all edges of the graph. Each edge is only visited once.

Specified by:
edges in interface UndirectedIntGraph
Returns:
The iterator.
See Also:
UndirectedIntGraph.numEdges()

edgesConnectedTo

java.util.Iterator<? extends UndirectedMutableIntGraph.Edge> edgesConnectedTo(int vertex)
Deprecated. 
Description copied from interface: UndirectedIntGraph
Get an iterator over all edges in the graph, given vertex is connected with.

Specified by:
edgesConnectedTo in interface UndirectedIntGraph
Parameters:
vertex - The vertex.
Returns:
The iterator.
See Also:
UndirectedIntGraph.numEdges(int)

getEdge

UndirectedMutableIntGraph.Edge getEdge(int vertexA,
                                       int vertexB)
Deprecated. 
Description copied from interface: UndirectedIntGraph
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.

Specified by:
getEdge in interface UndirectedIntGraph
Parameters:
vertexA - One vertex.
vertexB - The other vertex.
Returns:
The edge.
See Also:
UndirectedIntGraph.containsEdge(int, int), UndirectedIntGraph.getEdgeWeight(int, int)

addVertex

boolean addVertex(int vertex)
Deprecated. 
Add a vertex to the graph.

Parameters:
vertex - The vertex to be added.
Returns:
True if the graph changed during this call. False if the graph already contained that vertex.

removeVertex

boolean removeVertex(int vertex)
Deprecated. 
Remove a vertex from the graph.

Parameters:
vertex - The vertex to be removed.
Returns:
True if the graph changed during this call. False if the graph has not contained that vertex.

setEdgeWeight

double setEdgeWeight(int vertexA,
                     int vertexB,
                     double weight)
Deprecated. 
Set the weight of a edge determined by two vertices. If the new weight is UndirectedIntGraph.getUnconnectedWeight(), this should be the same as calling removeEdge(int, int). The old weight of the edge is returned, which may be UndirectedIntGraph.getUnconnectedWeight() if the edge had not existed.

Parameters:
vertexA - One vertex of the edge.
vertexB - The other vertex of the edge.
weight - The new weight of the edge.
Returns:
The value that would have been returned by a call to UndirectedIntGraph.getEdgeWeight(int, int) directly before this call.
Throws:
java.util.NoSuchElementException - If at least one of the two vertices is not a part of the graph (see UndirectedIntGraph.containsVertex(int)).

removeEdge

double removeEdge(int vertexA,
                  int vertexB)
Deprecated. 
Remove a edge determined by two vertices. The old weight of the edge is returned, which may be UndirectedIntGraph.getUnconnectedWeight() if the edge had not existed (in which case nothing has happened).

Parameters:
vertexA - One vertex of the edge.
vertexB - The other vertex of the edge.
Returns:
The value that would have been returned by a call to UndirectedIntGraph.getEdgeWeight(int, int) directly before this call.
Throws:
java.util.NoSuchElementException - If at least one of the two vertices is not a part of the graph (see UndirectedIntGraph.containsVertex(int)).