edu.rit.clu.network
Class FloydRandom
- java.lang.Object
-
- edu.rit.clu.network.FloydRandom
-
public class FloydRandom extends java.lang.ObjectClass FloydRandom is a main program that creates a distance matrix input file for the FloydSeq or FloydClu programs.Usage: java edu.rit.clu.network.FloydRandom seed radius N matrixfile
seed = Random seed
radius = Node adjacency radius
N = Number of nodes
matrixfile = Distance matrix fileThe program:
- Initializes a pseudorandom number generator with seed.
- Generates N nodes located at random positions in the unit square.
- 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.
- 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
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidmain(java.lang.String[] args)Main program.
-
DMelt 3.0 © DataMelt by jWork.ORG