mod objective

module objective

The Objective trait: typed S -> R map with bounds and optional known minimum. The Objective trait: a typed function Obj : S -> R from the IISE manuscript.

Variables

const EVAL_BATCH_PARALLEL_MIN: usize

Minimum batch size before the parallel eval fan-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_batch when 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^dim with a known feasible domain.

The IISE manuscript’s Obj signature: a typed map from a state space S = R^dim (with Bounds) to R. Implementors may override eval_batch and global_min for performance or known-optima instrumentation.

A real-valued function on R^dim with a known feasible domain.

Implementors may override eval_batch for multi-walker / multi-start backends (Rayon-native, Python single-attach batch, CUTEst worker pools).

Functions

fn bounds(&self) -> &Bounds<T>

The feasible domain (typically a box).

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 (see eval_batch_parallel for native f64).

fn global_min(&self) -> Option<&FPair<T>>

Optional known global minimum, used for benchmarking and convergence checks. Default returns None.

Implemented for

impl<const D: usize> Objective<f64> for Ackley<D>
impl<const D: usize> Objective<f64> for Rastrigin<D>
impl<const D: usize> Objective<f64> for Rosenbrock<D>
impl Objective<f64> for StybTang2D
impl Objective<f64> for PyObjective
impl<O: Objective<f64>> Objective<f64> for ReducedObjective<O>
impl Objective<f64> for ChebyshevSurrogate