mod objective¶
- module objective¶
The
Objectivetrait: typed S -> R map with bounds and optional known minimum. TheObjectivetrait: a typed function Obj : S -> R from the IISE manuscript.Variables
- const EVAL_BATCH_PARALLEL_MIN: usize¶
Minimum batch size before the parallel
evalfan-out is worth the spawn cost.
Functions
-
fn eval_batch_parallel<O>(obj: &O, x: ArrayView2<f64>) -> Array1<f64>¶
where
O: Objective<f64> + ?Sized
¶ Parallel multi-walker / multi-start batch evaluation for Objective<f64>.
Uses Rayon when x.nrows() >= EVAL_BATCH_PARALLEL_MIN. Prefer
Objective::eval_batchwhen the implementor has a specialized batch path (Python/CUTEst); this helper is the native Sync hot path.
Traits
- trait Objective<T: Float>¶
A real-valued function on
R^dimwith a known feasible domain.The IISE manuscript’s
Objsignature: a typed map from a state spaceS = R^dim(withBounds) toR. Implementors may overrideeval_batchandglobal_minfor performance or known-optima instrumentation.A real-valued function on
R^dimwith a known feasible domain.Implementors may override
eval_batchfor multi-walker / multi-start backends (Rayon-native, Python single-attach batch, CUTEst worker pools).Functions
- fn dim(&self) -> usize¶
Number of input dimensions; matches
bounds().dims.
- fn eval(&self, x: ArrayView1<T>) -> T¶
Evaluates the objective at a single point.
- fn eval_batch(&self, x: ArrayView2<T>) -> Array1<T>¶
Evaluates a batch of points (rows of
x).Default: serial loop over
Objective::eval. Override for multi-walker fan-out (seeeval_batch_parallelfor native f64).
- fn global_min(&self) -> Option<&FPair<T>>¶
Optional known global minimum, used for benchmarking and convergence checks. Default returns
None.
Implemented for