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 implementing
RandomNumberGenerator by 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
ConstructorsConstructorDescriptionAcceptanceRejectionRandomNumberGenerator(RandomNumberGenerator uniformRandomNumberGenerator, DoubleUnaryOperator targetDensity, DoubleUnaryOperator referenceDensity, DoubleUnaryOperator referenceDistributionICDF, double acceptanceLevel) -
Method Summary
Modifier and TypeMethodDescriptionintGet the sample vector dimension.double[]getNext()Get the next sample vector of dimension n, where n isgetDimension.
-
Constructor Details
-
AcceptanceRejectionRandomNumberGenerator
public AcceptanceRejectionRandomNumberGenerator(RandomNumberGenerator uniformRandomNumberGenerator, DoubleUnaryOperator targetDensity, DoubleUnaryOperator referenceDensity, DoubleUnaryOperator referenceDistributionICDF, double acceptanceLevel)
-
-
Method Details
-
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.
-