Class GSAAnnealingFunction
- java.lang.Object
-
- dev.nm.solver.multivariate.unconstrained.annealing.annealingfunction.GSAAnnealingFunction
-
- All Implemented Interfaces:
AnnealingFunction
public class GSAAnnealingFunction extends Object implements AnnealingFunction
The GSA proposal/annealing function.- See Also:
- "R's package GenSA, Engine.cpp"
-
-
Constructor Summary
Constructors Constructor Description GSAAnnealingFunction(double qv, RandomLongGenerator rlg, RandomStandardNormalGenerator rnorm)
Constructs a GSA annealing function.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
GSAMarkovLength(int dim)
The Markov length for GSA, i.e.Vector
nextProposal(Vector currentState, double temperature)
Gets the next proposal, given the current state and the temperature.
-
-
-
Constructor Detail
-
GSAAnnealingFunction
public GSAAnnealingFunction(double qv, RandomLongGenerator rlg, RandomStandardNormalGenerator rnorm)
Constructs a GSA annealing function.- Parameters:
qv
- the visiting parameterrlg
- a uniform random number generatorrnorm
- a standard random Normal number generator
-
-
Method Detail
-
GSAMarkovLength
public static int GSAMarkovLength(int dim)
The Markov length for GSA, i.e. the number of state transition attempts per temperature, is assumed to be 2 * dim. If we change this assumption, we must change also the annealing function.- Parameters:
dim
- the problem dimension- Returns:
- the Markov length that is assumed by nextProposal(dev.nm.algebra.linear.vector.doubles.Vector, double)
-
nextProposal
public Vector nextProposal(Vector currentState, double temperature)
Description copied from interface:AnnealingFunction
Gets the next proposal, given the current state and the temperature.- Specified by:
nextProposal
in interfaceAnnealingFunction
- Parameters:
currentState
- the current state of the systemtemperature
- the current temperature of the system- Returns:
- the next proposal
-
-