|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlogic.GraphGenerator
public class GraphGenerator
A internal counter for the nodeID is used to guarantee that same values for nodes are never used.
private static int numberOfNodes
Two members define a graph. A List for the nodes and a HashMap of the neighborhood nodes with the ID as the key value
The GraphGenerator uses randomly generated values for the neighbors of a node. To obtain such values the java.util.Random class is used.
| Nested Class Summary | |
|---|---|
static class |
GraphGenerator.Graph
|
| Constructor Summary | |
|---|---|
GraphGenerator()
|
|
| Method Summary | |
|---|---|
static GraphGenerator.Graph |
GenerateRandomGraph_constNodeSize(int numNodes,
int nodeSize)
Generates a random graph. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphGenerator()
| Method Detail |
|---|
public static GraphGenerator.Graph GenerateRandomGraph_constNodeSize(int numNodes,
int nodeSize)
numNodes - the number of nodesnodeSize - the size of nodes
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||