Class ProbabilityBoltzmann
- Namespace
- NanoQL.Experimental
- Assembly
- NanoQL.dll
A probability from a Boltzmann distribution: a point is accepted where 1/(1 + e^(−(current − new)/T)) is above a
uniform draw, T the largest temperature: QuantLib's ProbabilityBoltzmann.
[Experimental("NQL0001")]
[WorkingType]
public sealed class ProbabilityBoltzmann : IAnnealingProbability<ProbabilityBoltzmann>
- Inheritance
-
ProbabilityBoltzmann
- Implements
- Inherited Members
Remarks
Its draws are std::uniform_real_distribution<Real> on a std::mt19937, as MSVC draws them, on the
seed, which is required: QuantLib's default seeds from the clock. A working type.
Constructors
ProbabilityBoltzmann(long)
Initializes a new instance of the ProbabilityBoltzmann class.
public ProbabilityBoltzmann(long seed)
Parameters
seedlongThe seed, in [1, 4294967295].
Exceptions
- ArgumentOutOfRangeException
seedis outside [1, 4294967295].
Methods
Accept(double, double, Vector)
Whether the new point is accepted (QuantLib's operator()).
public bool Accept(double currentValue, double newValue, Vector temp)
Parameters
currentValuedoubleThe current point's value.
newValuedoubleThe new point's value.
tempVectorEach dimension's temperature.
Returns
Clone()
A copy, its state included: the copy's next call equals this probability's.
public ProbabilityBoltzmann Clone()
Returns
- ProbabilityBoltzmann
The copy.