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
-
ALLEDGES
- returns all edges
-
ALLVERTS
- returns all vertices
-
MT_GRAPH
- creates a new empty graph
-
RANDOM
- constructs a random graph; pass in a size instead of a location
specification.
-
TENVERT
- a ten vertex graph
-
GraphFactory(String)
-
-
GraphFactory(String, String)
-
-
arrayToGraph(boolean[][], int)
-
-
generate(int, int)
- Generates a data structure based on the type and position key.
-
getRandomGraph(int)
-
-
init(String)
- call to avoid null pointer exceptions, creates structures that take
parameters.
-
location(int)
- Returns the current container and a new location for that container
-
randomBuild(int)
-
-
setContainer(Object)
- Sets the current container of the factory, so that the factory can
generate locations like Position and Locator
MT_GRAPH
public static final int MT_GRAPH
- creates a new empty graph
ALLEDGES
public static final int ALLEDGES
- returns all edges
ALLVERTS
public static final int ALLVERTS
- returns all vertices
RANDOM
public static final int RANDOM
- constructs a random graph; pass in a size instead of a location
specification.
TENVERT
public static final int TENVERT
- a ten vertex graph
GraphFactory
public GraphFactory(String structToBuild)
GraphFactory
public GraphFactory(String structToBuild,
String arguments)
init
public void init(String arguments)
- call to avoid null pointer exceptions, creates structures that take
parameters.
generate
public TestStructure generate(int structure,
int location)
- Generates a data structure based on the type and position key.
- Overrides:
- generate in class GenericFactory
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
location
public TestStructure location(int location)
- Returns the current container and a new location for that container
- Overrides:
- location in class GenericFactory
randomBuild
public TestStructure randomBuild(int size)
arrayToGraph
public Object arrayToGraph(boolean graph[][],
int size)
getRandomGraph
public Graph getRandomGraph(int size)
All Packages Class Hierarchy This Package Previous Next Index