pub trait Optimizer: Send {
// Required methods
fn name(&self) -> &str;
fn doc_md(&self) -> &str;
fn coordinate_source(
&self,
space: &SearchSpace,
budget: &Budget,
lex: Box<dyn PullSource>,
) -> Box<dyn CoordinateSource>;
// Provided method
fn optimize(
&self,
space: &SearchSpace,
obj: &mut dyn Objective,
budget: &Budget,
) -> Report { ... }
}Expand description
A non-derivative, multi-factor optimizer — a stateless functor that
transforms the default lexicographic coordinate stream into a (possibly
adaptive) CoordinateSource (SRD-86). The search state lives in the
produced source, not in the optimizer.
Required Methods§
Sourcefn doc_md(&self) -> &str
fn doc_md(&self) -> &str
User-level documentation, in markdown (SRD-86 §5). Surfaced by
nmbrs describe optimizers.
Sourcefn coordinate_source(
&self,
space: &SearchSpace,
budget: &Budget,
lex: Box<dyn PullSource>,
) -> Box<dyn CoordinateSource>
fn coordinate_source( &self, space: &SearchSpace, budget: &Budget, lex: Box<dyn PullSource>, ) -> Box<dyn CoordinateSource>
Build the coordinate source from the param space, the budget, and the
default lex stream. sweep returns lex unchanged (identity). The
source owns its own termination (budget / convergence); the driver
pulls until it yields None.
Provided Methods§
Sourcefn optimize(
&self,
space: &SearchSpace,
obj: &mut dyn Objective,
budget: &Budget,
) -> Report
fn optimize( &self, space: &SearchSpace, obj: &mut dyn Objective, budget: &Budget, ) -> Report
Standalone driver: run the search by pulling this optimizer’s source
and querying obj, returning a Report. Used for unit testing and
the non-runtime path; the graph executor drives the source itself
(pull-through, observing each phase’s objective wire).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".