Package org.apache.spark.mllib.random
Class GammaGenerator
Object
org.apache.spark.mllib.random.GammaGenerator
- All Implemented Interfaces:
Serializable,RandomDataGenerator<Object>,Pseudorandom
Generates i.i.d. samples from the gamma distribution with the given shape and scale.
param: shape shape for the gamma distribution. param: scale scale for the gamma distribution
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
GammaGenerator
public GammaGenerator(double shape, double scale)
-
-
Method Details
-
copy
Description copied from interface:RandomDataGeneratorReturns a copy of the RandomDataGenerator with a new instance of the rng object used in the class when applicable for non-locking concurrent usage.- Specified by:
copyin interfaceRandomDataGenerator<Object>- Returns:
- (undocumented)
-
nextValue
public double nextValue()Description copied from interface:RandomDataGeneratorReturns an i.i.d. sample as a generic type from an underlying distribution.- Specified by:
nextValuein interfaceRandomDataGenerator<Object>- Returns:
- (undocumented)
-
scale
public double scale() -
setSeed
public void setSeed(long seed) Description copied from interface:PseudorandomSet random seed.- Specified by:
setSeedin interfacePseudorandom
-
shape
public double shape()
-