I built out a Simulated Annealing algo before finding James, and it looks much better, so I'd like to migrate.
I have a very generic (Kotlin) signature of
SimulatedAnnealing(vararg val dimensions: Dimension, val errorFunc: () -> Double) { ...
where a Dimension is a ClosedRange<Double> with a String name and a current/candidate value.
This allows ridiculously easy calls without custom classes like
val centerOfRotationX = Dimension(0..5000, "x")
val centerOfRotationY = Dimension(0..3000, "y")
val sf = SimulatedAnnealing(
centerOfRotationX,
centerOfRotationY
) {
doRotationAndReturnError(centerOfRotationX.candidate, centerOfRotationX.candidate)
}
while(sf.iterate()) {
println(sf.status())
}
println(sf.finalResult())
Could I somehow call James with a similar signature?