SALife Cycle Emitter Ifc
Promises the ability to emit an SAStatus at each process lifecycle transition. Fires unconditionally — at most four times per run with negligible allocation cost.
Usage:
finder.lifeCycleEmitter.attach { status ->
when (status) {
SAStatus.CONVERGED -> println("Root: ${finder.currentX}")
SAStatus.EXHAUSTED -> println("Max iterations reached.")
SAStatus.DEGENERATE_BOUNCE -> println("Boundary degeneracy — result unreliable.")
SAStatus.INITIALIZED -> println("Ready.")
}
}Content copied to clipboard