|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.util.GraphLib
public class GraphLib
Library routines for creating various Graph structures. All Graphs generated by methods of this class include a String-valued "label" field.
Field Summary | |
---|---|
static java.lang.String |
LABEL
Label data field included in generated Graphs |
static Schema |
LABEL_SCHEMA
Node table schema used for generated Graphs |
Method Summary | |
---|---|
static Tree |
getBalancedTree(int breadth,
int depth)
Returns a balanced tree of the requested breadth and depth. |
static Graph |
getClique(int n)
Returns a clique of given size. |
static Tree |
getDiamondTree(int b,
int d1,
int d2)
Create a diamond tree, with a given branching factor at each level, and depth levels for the two main branches. |
static Graph |
getGrid(int m,
int n)
Returns a graph structured as an m-by-n grid. |
static Graph |
getHoneycomb(int levels)
|
static Tree |
getLeftDeepTree(int depth)
Returns a left deep binary tree |
static Graph |
getNodes(int n)
Builds a completely unconnected (edge-free) graph with the given number of nodes |
static Tree |
getRightDeepTree(int depth)
Returns a right deep binary tree |
static Graph |
getStar(int n)
Builds a "star" graph with one central hub connected to the given number of satellite nodes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LABEL
public static final Schema LABEL_SCHEMA
Method Detail |
---|
public static Graph getNodes(int n)
n
- the number of nodes
public static Graph getStar(int n)
n
- the number of points of the star
public static Graph getClique(int n)
n
- the number of nodes in the graph
public static Graph getGrid(int m, int n)
m
- the number of rows of the gridn
- the number of columns of the grid
public static Graph getHoneycomb(int levels)
public static Tree getBalancedTree(int breadth, int depth)
breadth
- the breadth of each level of the treedepth
- the depth of the tree
public static Tree getLeftDeepTree(int depth)
depth
- the depth of the tree
public static Tree getRightDeepTree(int depth)
depth
- the depth of the tree
public static Tree getDiamondTree(int b, int d1, int d2)
b
- the number of children of each branch noded1
- the length of the first (left) branchd2
- the length of the second (right) branch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |