info.aduna.linkmap.graph
Interface Graph

All Known Implementing Classes:
GraphImpl

public interface Graph

A Graph contains a set of Vertices and a set of Edges containing these Vertices.

Is is possible that the collection of Edges returned by a Vertex contains Edges not contained in the Graph holding the Vertex. This makes efficient representation of subgraphs possible without the need to clone large parts of the graph datastructure.


Method Summary
 boolean contains(Edge edge)
          Returns whether this Graph contains the specified Edge.
 boolean contains(Vertex vertex)
          Returns whether this Graph contains the specified Vertex.
 Collection<Graph> getConnectedSubgraphs()
          Returns a set of Graphs containing disjoint subsets of the Vertices and Edges of this Graph, so that within each one of these Graphs there is a path between each pair of Vertices (ignoring directionality) but there are no paths to Vertices from other Graphs.
 Collection<Graph> getConnectedSubgraphs(Collection<Vertex> vertices, Collection<Edge> edges)
          Returns a set of Graphs containing disjoint subsets of the specified Vertices and Edges, so that within each one of these Graphs there is a path between each pair of Vertices (ignoring directionality) but there are no connections to Vertices from other Graphs.
 Collection<Edge> getEdges()
          Returns the set of Edges of this Graph.
 Collection<Vertex> getVertices()
          Returns the set of Vertices of this Graph.
 boolean isEmpty()
          Returns whether this Graph contains no Vertices and Edges.
 

Method Detail

getVertices

Collection<Vertex> getVertices()
Returns the set of Vertices of this Graph.


getEdges

Collection<Edge> getEdges()
Returns the set of Edges of this Graph.


isEmpty

boolean isEmpty()
Returns whether this Graph contains no Vertices and Edges.


contains

boolean contains(Vertex vertex)
Returns whether this Graph contains the specified Vertex.


contains

boolean contains(Edge edge)
Returns whether this Graph contains the specified Edge.


getConnectedSubgraphs

Collection<Graph> getConnectedSubgraphs()
Returns a set of Graphs containing disjoint subsets of the Vertices and Edges of this Graph, so that within each one of these Graphs there is a path between each pair of Vertices (ignoring directionality) but there are no paths to Vertices from other Graphs.


getConnectedSubgraphs

Collection<Graph> getConnectedSubgraphs(Collection<Vertex> vertices,
                                        Collection<Edge> edges)
Returns a set of Graphs containing disjoint subsets of the specified Vertices and Edges, so that within each one of these Graphs there is a path between each pair of Vertices (ignoring directionality) but there are no connections to Vertices from other Graphs.



Copyright © 1997-2008 Aduna. All Rights Reserved.