sampleInputFeasiblePoints

Generates a set of distinct input-feasible points for the problem, using one of two strategies depending on the size of the feasible grid relative to the request:

  • Enumeration — when the input grid has no more distinct points than numPoints (and is no larger than maxEnumeratedLatticeSize), the exact feasible set is enumerated directly via ProblemDefinition.enumerateFeasibleInputPoints. This is deterministic, consumes no random draws, and returns every feasible grid point — avoiding the rejection-sampling stall that would otherwise occur when the request exceeds the number of distinct feasible points.

  • Bounded rejection sampling — otherwise, points are drawn uniformly from the feasible region and de-duplicated. The sampling is bounded: it gives up after maxOf(problemDefinition.maxFeasibleSamplingIterations, 50 * numPoints) consecutive draws yield no new point, rather than looping forever if the feasible region has fewer than numPoints distinct points. The 50 * numPoints term keeps the threshold large relative to the coupon-collector expectation, so a legitimately large region is never truncated early.

In either case, if fewer than numPoints distinct feasible points exist, the smaller set is returned and a diagnostic is logged (reporting the input-lattice size and the limiting factor).

Return

the generated feasible input points; may contain fewer than numPoints points when the feasible region has fewer than numPoints distinct points

Parameters

numPoints

the size of the sample