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 implementingRandomNumberGenerator
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
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 int
getDimension()
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:RandomNumberGenerator
Get the next sample vector of dimension n, where n isgetDimension
. An implementation has to be thread safe.- Specified by:
getNext
in interfaceRandomNumberGenerator
- Returns:
- The next sample vector of dimension n, where n is
getDimension
.
-
getDimension
public int getDimension()
Description copied from interface:RandomNumberGenerator
Get the sample vector dimension.- Specified by:
getDimension
in interfaceRandomNumberGenerator
- Returns:
- The sample vector dimension n.
-
-