simulated_annealing library Null safety

Simulated annealing framework for Dart.

Classes

DataRecorder<T>
Records data of type T and List<T>.
EnergyField
Class representing the system energy and the domain over which it is defined (the search space).
FixedInterval
A fixed numerical interval defined by the start point start and the end point end.
Interval
Abstract class representing a numerical interval.
LoggingSimulator
Annealing simulator capable of logging variables via an object of type DataRecorder.
NumericalDataRecorder
Records data of type num and List<num>.
ParametricInterval
A numerical interval defined by the parametric start point function pStart and the end point pEnd.
SearchSpace
A search region with boundaries defined by intervals.
Simulator
Annealing simulator

Extensions

RandomInRange
Extension on Random providing the methods nextInRange and nextIntFromList.

Functions

defaultPerturbationSequence(List<num> temperatures, List<num> deltaPositionMax, List<num> deltaPositionMin) List<List<num>>
Returns a sequence of perturbation magnitude vectors by interpolating between deltPositionMax and deltaPositionMin.
exponentialSequence(num tStart, num tEnd, {int iterations = 1000}) List<num>
Exponentially decreasing sequence with start value tStart and end value tEnd.
geometricSequence(num tStart, num tEnd, {int iterations = 1000}) List<num>
Returns a geometric sequence with entries:
interpolate<T extends num>(List<num> temperatures, List<T> start, List<T> end) List<List<T>>
Returns a sequence of vectors by interpolating between start and end.
linearSequence(num tStart, num tEnd, {int iterations = 1000}) List<num>
Linear temperature sequence with entries:
lundySequence(num tStart, num tEnd, {int iterations = 1000}) List<num>
Returns the sequence: tStart, tStart / (1 + beta * tStart), ..., tStart / (1 * (n-1) * beta * tStart) where beta = (1 / tEnd - 1 / tStart) / (n - 1).
markovChainLength(num temperature, List<int> grid, {required num tStart, required num tEnd, int chainLengthStart = 5, int chainLengthEnd = 20}) int
Returns an integer between chainLengthStart and chainLengthEnd.
normalSequence(num tStart, num tEnd, {int iterations = 1000}) List<num>
Returns a monotonically decreasing sequence with entries: tStart, ..., tEnd.

Typedefs

Energy = num Function(List<num> x)
Function representing the system energy (cost function).
InverseCdf = num Function(num p, num xMin, num xMax)
Inverse cummulative distribution function of a probability distribution function with non-zero support over the interval: [xMin, xMax). The function must return a numerical value in the interval: [xMin, xMax).
MarkovChainLength = int Function(num temperature, List<int> grid)
Function returning an integer representing a Markov chain length (the number of simulated annealing iterations performed at constant temperature).
ParametricPoint = num Function()
Function defining an interval start/end point.
PerturbationSequence = List<List<num>> Function(List<num> temperatures, List<num> deltaPositionMax, List<num> deltaPositionMin)
Function returning a sequence of pertubation magnitude vectors.
TemperatureSequence = List<num> Function(num tStart, num tEnd, {int iterations})