org.apache.mahout.math.jet.random
Class Empirical

java.lang.Object
  extended by org.apache.mahout.math.PersistentObject
      extended by org.apache.mahout.math.jet.random.AbstractDistribution
          extended by org.apache.mahout.math.jet.random.AbstractContinousDistribution
              extended by org.apache.mahout.math.jet.random.Empirical
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.apache.mahout.math.function.DoubleFunction, IntFunction, UnaryFunction

Deprecated. until unit tests are in place. Until this time, this class/interface is unsupported.

@Deprecated
public class Empirical
extends AbstractContinousDistribution

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.mahout.math.jet.random.AbstractDistribution
randomGenerator
 
Constructor Summary
Empirical(double[] pdf, int interpolationType, java.util.Random randomGenerator)
          Deprecated. Constructs an Empirical distribution.
 
Method Summary
 double cdf(int k)
          Deprecated. Returns the cumulative distribution function.
 java.lang.Object clone()
          Deprecated. Returns a deep copy of the receiver; the copy will produce identical sequences.
 double nextDouble()
          Deprecated. Returns a random number from the distribution.
 double pdf(double x)
          Deprecated. Returns the probability distribution function.
 double pdf(int k)
          Deprecated. Returns the probability distribution function.
 void setState(double[] pdf, int interpolationType)
          Deprecated. Sets the distribution parameters.
 java.lang.String toString()
          Deprecated. Returns a String representation of the receiver.
 
Methods inherited from class org.apache.mahout.math.jet.random.AbstractContinousDistribution
cdf, nextInt
 
Methods inherited from class org.apache.mahout.math.jet.random.AbstractDistribution
apply, apply, getRandomGenerator, setRandomGenerator
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Empirical

public Empirical(double[] pdf,
                 int interpolationType,
                 java.util.Random randomGenerator)
Deprecated. 
Constructs an Empirical distribution. The probability distribution function (pdf) is an array of positive real numbers. It need not be provided in the form of relative probabilities, absolute probabilities are also accepted. The pdf must satisfy both of the following conditions

Parameters:
pdf - the probability distribution function.
interpolationType - can be either Empirical.NO_INTERPOLATION or Empirical.LINEAR_INTERPOLATION.
randomGenerator - a uniform random number generator.
Throws:
java.lang.IllegalArgumentException - if at least one of the three conditions above is violated.
Method Detail

cdf

public double cdf(int k)
Deprecated. 
Returns the cumulative distribution function.


clone

public java.lang.Object clone()
Deprecated. 
Returns a deep copy of the receiver; the copy will produce identical sequences. After this call has returned, the copy and the receiver have equal but separate state.

Overrides:
clone in class org.apache.mahout.math.PersistentObject
Returns:
a copy of the receiver.

nextDouble

public double nextDouble()
Deprecated. 
Returns a random number from the distribution.

Specified by:
nextDouble in class AbstractDistribution
Returns:
A new sample from this distribution.

pdf

public double pdf(double x)
Deprecated. 
Returns the probability distribution function.

Overrides:
pdf in class AbstractContinousDistribution

pdf

public double pdf(int k)
Deprecated. 
Returns the probability distribution function.


setState

public void setState(double[] pdf,
                     int interpolationType)
Deprecated. 
Sets the distribution parameters. The pdf must satisfy both of the following conditions

Parameters:
pdf - probability distribution function.
interpolationType - can be either Empirical.NO_INTERPOLATION or Empirical.LINEAR_INTERPOLATION.
Throws:
java.lang.IllegalArgumentException - if at least one of the three conditions above is violated.

toString

public java.lang.String toString()
Deprecated. 
Returns a String representation of the receiver.

Overrides:
toString in class java.lang.Object


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.