All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jdsltools.testers.graphtester.GraphFactory

java.lang.Object
   |
   +----jdsltools.testers.GenericFactory
           |
           +----jdsltools.testers.graphtester.GraphFactory

public class GraphFactory
extends GenericFactory
Builds Graphs.
MT_GRAPH: creates a new empty graph.
ALLEDGES: returns all edges
ALLVERTS: returns all vertices
RANDOM: constructs a random graph with all edges undirected; pass in a size instead of a location. Locations will be made, namely all vertices
TENVERT: a ten vertex graph

Author:
Marco da Silva

Variable Index

 o ALLEDGES
returns all edges
 o ALLVERTS
returns all vertices
 o MT_GRAPH
creates a new empty graph
 o RANDOM
constructs a random graph; pass in a size instead of a location specification.
 o TENVERT
a ten vertex graph

Constructor Index

 o GraphFactory(String)
 o GraphFactory(String, String)

Method Index

 o arrayToGraph(boolean[][], int)
 o generate(int, int)
Generates a data structure based on the type and position key.
 o getRandomGraph(int)
 o init(String)
call to avoid null pointer exceptions, creates structures that take parameters.
 o location(int)
Returns the current container and a new location for that container
 o randomBuild(int)
 o setContainer(Object)
Sets the current container of the factory, so that the factory can generate locations like Position and Locator

Variables

 o MT_GRAPH
 public static final int MT_GRAPH
creates a new empty graph

 o ALLEDGES
 public static final int ALLEDGES
returns all edges

 o ALLVERTS
 public static final int ALLVERTS
returns all vertices

 o RANDOM
 public static final int RANDOM
constructs a random graph; pass in a size instead of a location specification.

 o TENVERT
 public static final int TENVERT
a ten vertex graph

Constructors

 o GraphFactory
 public GraphFactory(String structToBuild)
 o GraphFactory
 public GraphFactory(String structToBuild,
                     String arguments)

Methods

 o init
 public void init(String arguments)
call to avoid null pointer exceptions, creates structures that take parameters.

 o generate
 public TestStructure generate(int structure,
                               int location)
Generates a data structure based on the type and position key.

Overrides:
generate in class GenericFactory
 o setContainer
 public void setContainer(Object container)
Sets the current container of the factory, so that the factory can generate locations like Position and Locator

Overrides:
setContainer in class GenericFactory
 o location
 public TestStructure location(int location)
Returns the current container and a new location for that container

Overrides:
location in class GenericFactory
 o randomBuild
 public TestStructure randomBuild(int size)
 o arrayToGraph
 public Object arrayToGraph(boolean graph[][],
                            int size)
 o getRandomGraph
 public Graph getRandomGraph(int size)

All Packages  Class Hierarchy  This Package  Previous  Next  Index