Algorithm
Development Kit 1.0

algs.model.network.debug
Class CreateImage

java.lang.Object
  extended by algs.model.network.debug.CreateImage

public class CreateImage
extends java.lang.Object

Given a FlowNetwork object, use the DottyDebugger to represent the flow graph.

Since:
1.0
Version:
1.0, 6/15/08
Author:
George Heineman

Field Summary
protected  DottyDebugger dd
          Debugger to use, which defaults to having directed edges shown.
 
Constructor Summary
CreateImage()
           
 
Method Summary
protected  void assignVertices(FlowNetwork<?> fn)
          Assign node entities for all nodes in the graph according to their unique indices.
protected  IGraphEntity get(int idx)
          Get the node identified by the integer index.
 void outputGraph(FlowNetwork<?> fn)
          Output to stdout a dotty representation without cut.
 void outputGraph(FlowNetwork<?> fn, boolean includeCut)
          Output to stdout a dotty representation and include the minCut.
protected  void set(int idx, IGraphEntity ge)
          Set the node to be associated with the integer index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dd

protected final DottyDebugger dd
Debugger to use, which defaults to having directed edges shown.

Constructor Detail

CreateImage

public CreateImage()
Method Detail

outputGraph

public void outputGraph(FlowNetwork<?> fn)
Output to stdout a dotty representation without cut.

Parameters:
fn - The flow network

outputGraph

public void outputGraph(FlowNetwork<?> fn,
                        boolean includeCut)
Output to stdout a dotty representation and include the minCut.

Parameters:
fn - the flow network
includeCut - determine whether to include the cut

get

protected IGraphEntity get(int idx)
Get the node identified by the integer index.

Parameters:
idx -

set

protected void set(int idx,
                   IGraphEntity ge)
Set the node to be associated with the integer index.

Parameters:
idx - unique index value
ge - graph entity to be associated with that index.

assignVertices

protected void assignVertices(FlowNetwork<?> fn)
Assign node entities for all nodes in the graph according to their unique indices. Can be overridden for specialized displaying of nodes

Parameters:
fn - the flow network problem.

Algorithm Development Kit 1.0

This code supports the Algorithms in a Nutshell book, published by O'Reilly Media, Inc. in November 2008. Please visit the book web page to learn of any changes to the code repository or to record a potential defect.