|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uci.ics.jung.graph.util.TestGraphs
public class TestGraphs
Provides generators for several different test graphs.
Field Summary | |
---|---|
static String[][] |
pairs
A series of pairs that may be useful for generating graphs. |
Constructor Summary | |
---|---|
TestGraphs()
|
Method Summary | |
---|---|
static Graph<String,Number> |
createChainPlusIsolates(int chain_length,
int isolate_count)
Returns a graph consisting of a chain of vertex_count - 1 vertices
plus one isolated vertex. |
static Graph<String,Number> |
createDirectedAcyclicGraph(int layers,
int maxNodesPerLayer,
double linkprob)
Creates a sample directed acyclic graph by generating several "layers", and connecting nodes (randomly) to nodes in earlier (but never later) layers. |
static Graph<String,Number> |
createTestGraph(boolean directed)
Creates a small sample graph that can be used for testing purposes. |
static Graph<String,Number> |
getDemoGraph()
Returns a bigger test graph with a clique, several components, and other parts. |
static Graph<String,Number> |
getOneComponentGraph()
Returns a bigger, undirected test graph with a just one component. |
static Graph<String,Number> |
getSmallGraph()
Returns a small graph with directed and undirected edges, and parallel edges. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String[][] pairs
Constructor Detail |
---|
public TestGraphs()
Method Detail |
---|
public static Graph<String,Number> createTestGraph(boolean directed)
pairs
. If isDirected
,
the graph is a DirectedSparseMultigraph
,
otherwise, it is an UndirectedSparseMultigraph
.
public static Graph<String,Number> createChainPlusIsolates(int chain_length, int isolate_count)
vertex_count - 1
vertices
plus one isolated vertex.
public static Graph<String,Number> createDirectedAcyclicGraph(int layers, int maxNodesPerLayer, double linkprob)
public static Graph<String,Number> getOneComponentGraph()
public static Graph<String,Number> getDemoGraph()
public static Graph<String,Number> getSmallGraph()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |