graph
Class GenGraphs

java.lang.Object
  extended bygraph.GenGraphs

public class GenGraphs
extends java.lang.Object

The main program for a test driver.


Constructor Summary
GenGraphs()
           
 
Method Summary
static Graph genAsymGraph(int N, double D)
          Tries to generate a random asymmetric graphs.
static void main(java.lang.String[] arg)
          Generates a specified number of random asymmetric graphs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenGraphs

public GenGraphs()
Method Detail

genAsymGraph

public static Graph genAsymGraph(int N,
                                 double D)
                          throws java.lang.Exception
Tries to generate a random asymmetric graphs. Note: this method may sit in an almost-infinite loop (and then throw an Exception after after 1000 tries) if there are no or very few asymmetric graphs of the desirable size. In practice, this never happens with N>=10 and a high enough D. (D>=5 is fine for N = 10... 200; D>=10 is fine for N=100 .. 10000)

Parameters:
N - number of nodes in the graph
D - the average degree of a node in the graph
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] arg)
                 throws java.lang.Exception
Generates a specified number of random asymmetric graphs. There is no guarantee, of course, that all generated graphs will be different, or non-isomorphic. Note: this program may sit in an almost-infinite loop (and then stop after 1000 tries) if there are no or very few asymmetric graphs of the desirable size. In practice, this never happens with N>=10 and a high enough D. (D>=5 is fine for N = 10... 200; D>=10 is fine for N=100 .. 10000)

Throws:
java.lang.Exception