Documentation of 'edu.rit.clu.network.FloydRandom' Java class
FloydRandom
edu.rit.clu.network

Class FloydRandom



  • public class FloydRandom
    extends java.lang.Object
    Class 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 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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void main(java.lang.String[] args)
      Main program.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • main

        public static void main(java.lang.String[] args)
                         throws java.lang.Exception
        Main program.
        Throws:
        java.lang.Exception

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.