org.apache.commons.graph
Interface Graph<V extends Vertex,E extends Edge<V>>

Type Parameters:
V - the Graph vertices type
E - the Graph edges type
All Known Subinterfaces:
DirectedGraph<V,E>, MutableDirectedGraph<V,E>, MutableGraph<V,E>, UndirectedGraph<V,E>, WeightedGraph<V,WE>
All Known Implementing Classes:
BaseGraph, BaseMutableGraph, DirectedMutableGraph, DirectedMutableWeightedGraph

public interface Graph<V extends Vertex,E extends Edge<V>>

A Graph data structure consists of a finite (and possibly mutable) set of ordered pairs, called Edges or arcs, of certain entities called Vertex or node. As in mathematics, an Edge (x,y) is said to point or go from x to y.


Method Summary
 Set<E> getEdges()
          Returns the total set of Edges in the graph.
 Set<E> getEdges(V v)
          Returns all edges which touch this vertex, where the input vertex is in the edge head.
 Set<V> getVertices()
          Returns the total set of Vertices in the graph.
 Set<V> getVertices(E e)
          Return the set of Vertex on the input Edge (2 for normal edges, > 2 for HyperEdges)
 

Method Detail

getVertices

Set<V> getVertices()
Returns the total set of Vertices in the graph.

Returns:
the total set of Vertices in the graph.

getEdges

Set<E> getEdges()
Returns the total set of Edges in the graph.

Returns:
the total set of Edges in the graph.

getEdges

Set<E> getEdges(V v)
Returns all edges which touch this vertex, where the input vertex is in the edge head.

Returns:
all edges which touch this vertex, where the input vertex is in the edge head.

getVertices

Set<V> getVertices(E e)
Return the set of Vertex on the input Edge (2 for normal edges, > 2 for HyperEdges)

Returns:
the set of Vertex on this Edge.


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.