de.aitools.aq.graph.weighted
Interface UndirectedMutableLongGraph

All Superinterfaces:
UndirectedLongGraph
All Known Implementing Classes:
ConcreteUndirectedLongGraph

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

public interface UndirectedMutableLongGraph
extends UndirectedLongGraph

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

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

Nested Class Summary
static interface UndirectedMutableLongGraph.Edge
          Deprecated. The extension of UndirectedLongGraph.Edge to be mutable.
 
Field Summary
 
Fields inherited from interface de.aitools.aq.graph.weighted.UndirectedLongGraph
DEFAULT_UNCONNECTED_WEIGHT
 
Method Summary
 boolean addVertex(long vertex)
          Deprecated. Add a vertex to the graph.
 java.util.Iterator<? extends UndirectedMutableLongGraph.Edge> edges()
          Deprecated. Get an iterator over all edges of the graph.
 java.util.Iterator<? extends UndirectedMutableLongGraph.Edge> edgesConnectedTo(long vertex)
          Deprecated. Get an iterator over all edges in the graph, given vertex is connected with.
 UndirectedMutableLongGraph.Edge getEdge(long vertexA, long vertexB)
          Deprecated. Get the UndirectedLongGraph.Edge connecting the two vertices.
 double removeEdge(long vertexA, long vertexB)
          Deprecated. Remove a edge determined by two vertices.
 boolean removeVertex(long vertex)
          Deprecated. Remove a vertex from the graph.
 double setEdgeWeight(long vertexA, long 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 UndirectedLongGraph.getEdgeWeight(long, long) if the two vertices are not connected.
 
Methods inherited from interface de.aitools.aq.graph.weighted.UndirectedLongGraph
containsEdge, containsVertex, getEdgeWeight, getUnconnectedWeight, numEdges, numEdges, numVertices, vertices, verticesConnectedTo
 

Method Detail

setUnconnectedWeight

void setUnconnectedWeight(double unconnectedWeight)
Deprecated. 
Change the weight that is returned by UndirectedLongGraph.getEdgeWeight(long, long) 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 UndirectedMutableLongGraph.Edge> edges()
Deprecated. 
Description copied from interface: UndirectedLongGraph
Get an iterator over all edges of the graph. Each edge is only visited once.

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

edgesConnectedTo

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

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

getEdge

UndirectedMutableLongGraph.Edge getEdge(long vertexA,
                                        long vertexB)
Deprecated. 
Description copied from interface: UndirectedLongGraph
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.

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

addVertex

boolean addVertex(long 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(long 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(long vertexA,
                     long vertexB,
                     double weight)
Deprecated. 
Set the weight of a edge determined by two vertices. If the new weight is UndirectedLongGraph.getUnconnectedWeight(), this should be the same as calling removeEdge(long, long). The old weight of the edge is returned, which may be UndirectedLongGraph.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 UndirectedLongGraph.getEdgeWeight(long, long) directly before this call.
Throws:
java.util.NoSuchElementException - If at least one of the two vertices is not a part of the graph (see UndirectedLongGraph.containsVertex(long)).

removeEdge

double removeEdge(long vertexA,
                  long vertexB)
Deprecated. 
Remove a edge determined by two vertices. The old weight of the edge is returned, which may be UndirectedLongGraph.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 UndirectedLongGraph.getEdgeWeight(long, long) directly before this call.
Throws:
java.util.NoSuchElementException - If at least one of the two vertices is not a part of the graph (see UndirectedLongGraph.containsVertex(long)).