Class BoxGSAAcceptanceProbabilityFunction
- java.lang.Object
-
- dev.nm.solver.multivariate.unconstrained.annealing.acceptanceprobabilityfunction.BoxGSAAcceptanceProbabilityFunction
-
- All Implemented Interfaces:
TemperedAcceptanceProbabilityFunction
public class BoxGSAAcceptanceProbabilityFunction extends Object implements TemperedAcceptanceProbabilityFunction
This probability function boxes an unconstrained probability function so that when a proposed state is outside the box, it has a probability of 0.- See Also:
- "R's GenSA"
-
-
Constructor Summary
Constructors Constructor Description BoxGSAAcceptanceProbabilityFunction(Vector lower, Vector upper, double qa)
Constructs a boxed acceptance probability function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
acceptanceProbability(Vector currentState, double currentEnergy, Vector proposedState, double proposedEnergy, double temperature)
Computes the probability that the next state transition will be accepted.
-
-
-
Method Detail
-
acceptanceProbability
public double acceptanceProbability(Vector currentState, double currentEnergy, Vector proposedState, double proposedEnergy, double temperature)
Description copied from interface:TemperedAcceptanceProbabilityFunction
Computes the probability that the next state transition will be accepted.- Specified by:
acceptanceProbability
in interfaceTemperedAcceptanceProbabilityFunction
- Parameters:
currentState
- the current state of the systemcurrentEnergy
- the energy in the current stateproposedState
- the proposed next state of the systemproposedEnergy
- the energy in the proposed statetemperature
- the current temperature- Returns:
- the acceptance probability
-
-