sample

fun sample(mpa: MostPromisingArea, start: DoubleArray, halfSpaces: List<HalfSpace> = mpa.allHalfSpaces, warmUp: Int = defaultWarmUp): DoubleArray(source)

Draws a point from mpa by running a coordinate-direction walk for warmUp moves beginning at start. start must already lie in the MPA; the returned point also lies in the MPA. The walk uses halfSpaces for the per-axis interval — pass the MPA's active half-spaces to skip redundant ones, or MostPromisingArea.allHalfSpaces for the unpruned set.

Parameters

mpa

the most-promising area to sample within

start

the starting point (in the problem's input order); copied, not mutated

halfSpaces

the half-spaces defining the MPA used for per-axis bounds; defaults to all

warmUp

the number of coordinate moves to perform; defaults to defaultWarmUp