class State
package geometrize
Constructor
Variables
score:Float
The score of the state, a measure of the improvement applying the state to the current bitmap will have.
Methods
Creates a copy of the state. Deep copy of the shape and alpha, shallow copy of the bitmap buffers. Score not copied.
Returns:
The cloned state.
energy (lastScore:Float):Float
Calculates a measure of the improvement drawing the shape to the current bitmap will have. The lower the energy, the better. The score is cached, set it to < 0 to recalculate it.
Parameters:
lastScore | The last score recorded by the model. |
---|
Returns:
The energy measure.