fi.joensuu.cs.tra
Class DiGraph

java.lang.Object
  extended by fi.joensuu.cs.tra.AbstractGraph
      extended by fi.joensuu.cs.tra.DiGraph
All Implemented Interfaces:
Iterable

public class DiGraph
extends AbstractGraph
implements Iterable

A DiGraph or a directed graph is an ordered pair G := (V, A) with

An edge e = (x, y) is considered to be directed from x to y.
DiGraph is simply a subclass of the abstract class AbstractGraph that sets it up in directed mode.

Example:
     void dfsColor(Vertex vertex, int color) {
       vertex.setColor(color);
       for (Vertex neighborVertex : vertex.neighbours())
         if (neighborVertex.getColor() != color)
             dfsColor(neighborVertex, color);
     }
 

See Also:
Vertex, Edge, Graph, AbstractGraph

Nested Class Summary
 
Nested classes/interfaces inherited from class fi.joensuu.cs.tra.AbstractGraph
AbstractGraph.EdgeIteratorWrapper, AbstractGraph.VertexIteratorWrapper
 
Field Summary
 
Fields inherited from class fi.joensuu.cs.tra.AbstractGraph
BLACK, BLUE, GRAY, GREEN, GREY, NaN, RED, WHITE
 
Constructor Summary
DiGraph()
           
 
Method Summary
 
Methods inherited from class fi.joensuu.cs.tra.AbstractGraph
addVertex, addVertex, addVertex, addVertex, addVertex, addVertex, addVertex, addVertex, addVertex, addVertex, addVertex, addVertex, edgeIterator, edges, firstVertex, isDiGraph, iterator, removeVertex, size, toString, vertexCount, vertexIterator, vertices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Iterable
iterator
 

Constructor Detail

DiGraph

public DiGraph()