org.rblasch.convert.graph
Class SparseWeightedDirectedGraph

java.lang.Object
  extended byorg.rblasch.convert.graph.SparseWeightedDirectedGraph
All Implemented Interfaces:
DirectedGraph, Graph, WeightedDirectedGraph, WeightedGraph

public final class SparseWeightedDirectedGraph
extends java.lang.Object
implements WeightedDirectedGraph


Constructor Summary
SparseWeightedDirectedGraph()
           
 
Method Summary
 void addConnection(Vertex start, Edge edge, Vertex end)
          Enter a new segment in the graph.
 void addVertex(Vertex v)
          Ener a new vertex in the graph.
 boolean equals(java.lang.Object obj)
           
 java.util.Set getAllConnections()
           
 java.util.Set getConnections(Vertex start, Vertex end)
           
 java.util.Set getEdges()
           
 java.util.Set getInbound(Vertex vertex)
          Get the list of vertices that lead to the given vertex.
 java.util.Set getOutbound(Vertex vertex)
          Get the list of vertices that can be reached from the given vertex.
 java.util.Set getVertices()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SparseWeightedDirectedGraph

public SparseWeightedDirectedGraph()
Method Detail

getVertices

public java.util.Set getVertices()
Specified by:
getVertices in interface Graph

getEdges

public java.util.Set getEdges()
Specified by:
getEdges in interface Graph

addVertex

public void addVertex(Vertex v)
Description copied from interface: Graph
Ener a new vertex in the graph.

Specified by:
addVertex in interface Graph
Parameters:
v - vertex

addConnection

public void addConnection(Vertex start,
                          Edge edge,
                          Vertex end)
Enter a new segment in the graph.

Specified by:
addConnection in interface Graph

getAllConnections

public java.util.Set getAllConnections()
Specified by:
getAllConnections in interface Graph

getConnections

public java.util.Set getConnections(Vertex start,
                                    Vertex end)
Specified by:
getConnections in interface Graph

getOutbound

public java.util.Set getOutbound(Vertex vertex)
Get the list of vertices that can be reached from the given vertex.

Specified by:
getOutbound in interface Graph

getInbound

public java.util.Set getInbound(Vertex vertex)
Get the list of vertices that lead to the given vertex.

Specified by:
getInbound in interface Graph

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()

toString

public java.lang.String toString()


Copyright © 2004 Ronald Blaschke. All Rights Reserved.