EnergyField class

Class representing the system energy and the domain over which it is defined (the search space).

  • The function energy must be defined for each point belonging to the search space.

Constructors

EnergyField(Energy energy, SearchSpace space)
Constructs an object of type EnergyField.
EnergyField.of(EnergyField energyField)
Copy constructor.
factory

Properties

dimensions int
Returns the search space dimension.
no setter
energy Energy
Function representing the system energy.
final
hashCode int
The hash code for this object.
no setterinherited
minPosition List<num>
Returns the field position with the smallest energy encountered.
no setter
minValue num
Returns the smallest energy value encountered.
no setter
position List<num>
Returns the current field position.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size List<num>
Returns the size of the energy field domain (the search space).
no setter
space SearchSpace
The domain over which the energy function is defined. The simulated annealing algorithm will search this region for optimal solutions.
final
value num
Returns the current value of the energy at location position.
no setter

Methods

next() num
Returns the energy at a randomly selected point in the search space.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
perturb(List<num> position, List<num> deltaPosition) num
Returns the energy at a point selected randomly from the region (position - deltaPosition, position + deltaPosition).
sample({int sampleSize = 100}) Future<List<List<num>>>
Returns an object of type List<List<num>> with length sampleSize. Each entry is obtained by listing the current position and energy.
sampleEnergy({int sampleSize = 100}) Future<List<num>>
Returns a list of energy values sampled from the entire search space.
sampleEnergyCloseTo(List<num> position, List<num> deltaPosition, {int sampleSize = 100, bool selectUphillMoves = false}) Future<List<num>>
Returns a list of energy values sampled from a neighbourhood around position using perturbation magnitudes deltaPosition.
tEnd(num gamma, {dynamic deltaPosition = const <num>[], int sampleSize = 200}) Future<num>
Returns the temperature at which the expectation value of the acceptance probability of up-hill transitions approaches gamma.
toString() String
A string representation of this object.
override
transitions(List<num> deltaPosition, {int sampleSize = 100, int maxTrials = 20}) List<List<num>>
Returns a list containing the energy values at two positions separated at most by deltaPosition.
tStart(num gamma, {List<num> deltaPosition = const <num>[], int sampleSize = 200}) Future<num>
Returns the temperature at which the expectation value of the acceptance probability of up-hill transitions approaches gamma.

Operators

operator ==(Object other) bool
The equality operator.
inherited