Rmd Sampler
A coordinate-direction (RMD — random multidimensional) sampler that draws points approximately uniformly from a MostPromisingArea. Starting from a point known to lie in the MPA, the sampler repeatedly picks a random coordinate and resamples that coordinate from its feasible interval, holding the others fixed — a Gibbs-style walk over the polytope. After a warm-up of such moves the current point is returned.
The feasible interval for the chosen axis is the intersection of:
the box bounds
[lower_j, upper_j]from the problem, andthe per-axis bound implied by every half-space
a · x <= bin the MPA (the original linear constraints and the active halfway hyperplanes), holding the other coordinates fixed.
When the input has positive granularity the axis is resampled on its integer grid lower_j + m * g_j; with zero granularity it is resampled continuously. After each proposed move the full point is checked with ProblemDefinition.isInputFeasible so that functional constraints not expressible as half-spaces are respected: an infeasible proposal is rejected and the walk stays at the current value for that step. A run is reproducible for a fixed rnStream.
Parameters
the problem supplying box bounds, granularities, and the feasibility test
the random stream driving axis selection and resampling
the default number of coordinate moves per sample call
Constructors
Functions
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.