public class TestGraphs
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[][] |
pairs
A series of pairs that may be useful for generating graphs.
|
| Constructor and Description |
|---|
TestGraphs() |
| Modifier and Type | Method and Description |
|---|---|
static Graph |
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 |
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 AbstractSparseGraph |
createTestGraph(boolean isDirected)
Creates a small sample graph that can be used for testing purposes.
|
static Graph |
generateMixedRandomGraph(NumberEdgeValue edge_weight,
int num_vertices)
Equivalent to
generateMixedRandomGraph(edge_weight, num_vertices, true). |
static Graph |
generateMixedRandomGraph(NumberEdgeValue edge_weights,
int num_vertices,
boolean parallel)
Returns a random mixed-mode graph.
|
static Graph |
getDemoGraph()
Returns a bigger test graph with a clique, several components, and other
parts.
|
static Graph |
getOneComponentGraph()
Returns a bigger, undirected test graph with a just one component.
|
public static java.lang.String[][] pairs
public static AbstractSparseGraph createTestGraph(boolean isDirected)
pairs. If isDirected,
the graph is a DirectedSparseGraph,
otherwise, it is an UndirectedSparseGraph.isDirected: - Is the graph directed?public static Graph createChainPlusIsolates(int chain_length, int isolate_count)
vertex_count - 1 vertices
plus one isolated vertex.public static Graph createDirectedAcyclicGraph(int layers, int maxNodesPerLayer, double linkprob)
public static Graph getOneComponentGraph()
public static Graph getDemoGraph()
public static Graph generateMixedRandomGraph(NumberEdgeValue edge_weight, int num_vertices)
generateMixedRandomGraph(edge_weight, num_vertices, true).public static Graph generateMixedRandomGraph(NumberEdgeValue edge_weights, int num_vertices, boolean parallel)