edu.rit.hyb.network
Class FloydRandom

java.lang.Object
  extended by edu.rit.hyb.network.FloydRandom

public class FloydRandom
extends Object

Class FloydRandom is a main program that creates a distance matrix input file for the FloydSeq or FloydHyb programs.

Usage: java edu.rit.hyb.network.FloydRandom seed radius N matrixfile
seed = Random seed
radius = Node adjacency radius
N = Number of nodes
matrixfile = Distance matrix file

The program:

  1. Initializes a pseudorandom number generator with seed.
  2. Generates N nodes located at random positions in the unit square.
  3. Sets up the distance matrix D. If two nodes are within a Euclidean distance radius of each other, the nodes are adjacent, otherwise the nodes are not adjacent. radius = 0.25 works well.
  4. Stores the distance matrix in the matrixfile.

The distance matrix file is a binary file written in the format required by class DoubleMatrixFile.


Method Summary
static void main(String[] args)
          Main program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)
                 throws Exception
Main program.

Throws:
Exception


Copyright © 2005-2012 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.