|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.model.GraphManipulation
This class has code that manipulates different sorts of graphs that are used frequently or that are some sort of standard graphs. These graphs are used for debugging and testing graph algorithms and might also be of interest for api users or even final-customers.
| Method Summary | |
static void |
addEdges(Graph graph,
int n)
Adds n edges to the graph. |
static void |
addNodes(Graph graph,
int n)
Adds n nodes to the graph. |
static void |
deleteRandomEdges(Graph graph,
int n)
Deletes n random edges from the graph. |
static void |
deleteRandomNodes(Graph graph,
int n)
Deletes n random nodes from the graph. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final void deleteRandomEdges(Graph graph,
int n)
throws GraphException
graph - the graph to remove edges from.n - the number of edges to remove.
GraphException - thrown if something goes wrong
during the edge removal.
public static final void deleteRandomNodes(Graph graph,
int n)
throws GraphException
graph - the graph to remove nodes from.n - the number of nodes to remove.
GraphException - thrown if something goes wrong
during the node removal.
public static final void addEdges(Graph graph,
int n)
throws GraphException
n edges to the graph. The graph should have at least
2 nodes. Nodes are selected pseudo-randomly. This method uses to lists.
graph - the graph to add edges to.n - the number of edges to add.
GraphException - thrown if something goes wrong
during the edge addition.
public static final void addNodes(Graph graph,
int n)
throws GraphException
graph - the graph to add nodes to.n - the number of nodes to add.
GraphException - thrown if something goes wrong
during the node addition.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||