com.graphbuilder.math.func
Class RandFunction

java.lang.Object
  extended bycom.graphbuilder.math.func.RandFunction
All Implemented Interfaces:
Function

public class RandFunction
extends java.lang.Object
implements Function

The random function.

See Also:
Math.random()

Constructor Summary
RandFunction()
           
 
Method Summary
 boolean acceptNumParam(int numParam)
          Returns true only for 0 parameters, false otherwise.
 double of(double[] d, int numParam)
          Returns a random value in the range [0, 1) that does not depend on the input.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RandFunction

public RandFunction()
Method Detail

of

public double of(double[] d,
                 int numParam)
Returns a random value in the range [0, 1) that does not depend on the input.

Specified by:
of in interface Function

acceptNumParam

public boolean acceptNumParam(int numParam)
Returns true only for 0 parameters, false otherwise.

Specified by:
acceptNumParam in interface Function

toString

public java.lang.String toString()