nl.uu.cs.treewidth.input
Interface GraphInput

All Known Implementing Classes:
CliqueGraphGenerator, DgfReader, GridGraphGenerator, NKnightGraphGenerator, NQueenGraphGenerator, RandomGraphGenerator, StarGraphGenerator

public interface GraphInput

Interface for classes that can return a Graph.

Using this interface the program can be oblivious of where the graph data is coming from (e.g. read a DGF file, or generate some random graph.

Example usage:

 GraphInput input = new DgfReader( "myGraph.dgf" );
 NGraph g = null;
 try {
     g = input.get();
 } catch (InputException e) { ... }
 

Example usage:

 GraphInput input = new GridGraphGenerator( 3, 7 );
 NGraph g = null;
 try {
     g = input.get();
 } catch (InputException e) { ... }
 

Author:
tw team

Nested Class Summary
static class GraphInput.InputData
           
 
Method Summary
 NGraph<GraphInput.InputData> get()
          Return a graph.
 

Method Detail

get

NGraph<GraphInput.InputData> get()
                                 throws InputException
Return a graph. Implementing classes will have additional interface to give meaning to this call.

Returns:
A graph; entirely up to implementing classes what to return.
Throws:
InputException