Module net.finmath.lib
Package net.finmath.randomnumbers
Class AcceptanceRejectionRandomNumberGenerator
- java.lang.Object
-
- net.finmath.randomnumbers.AcceptanceRejectionRandomNumberGenerator
-
- All Implemented Interfaces:
Serializable,RandomNumberGenerator
public class AcceptanceRejectionRandomNumberGenerator extends Object implements RandomNumberGenerator
Class implementingRandomNumberGeneratorby the acceptance rejection method. Note that the acceptance rejection methods requires a two dimensional uniform random number sequence with independent components.- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AcceptanceRejectionRandomNumberGenerator(RandomNumberGenerator uniformRandomNumberGenerator, DoubleUnaryOperator targetDensity, DoubleUnaryOperator referenceDensity, DoubleUnaryOperator referenceDistributionICDF, double acceptanceLevel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDimension()Get the sample vector dimension.double[]getNext()Get the next sample vector of dimension n, where n isgetDimension.
-
-
-
Constructor Detail
-
AcceptanceRejectionRandomNumberGenerator
public AcceptanceRejectionRandomNumberGenerator(RandomNumberGenerator uniformRandomNumberGenerator, DoubleUnaryOperator targetDensity, DoubleUnaryOperator referenceDensity, DoubleUnaryOperator referenceDistributionICDF, double acceptanceLevel)
-
-
Method Detail
-
getNext
public double[] getNext()
Description copied from interface:RandomNumberGeneratorGet the next sample vector of dimension n, where n isgetDimension. An implementation has to be thread safe.- Specified by:
getNextin interfaceRandomNumberGenerator- Returns:
- The next sample vector of dimension n, where n is
getDimension.
-
getDimension
public int getDimension()
Description copied from interface:RandomNumberGeneratorGet the sample vector dimension.- Specified by:
getDimensionin interfaceRandomNumberGenerator- Returns:
- The sample vector dimension n.
-
-