pub struct RandomRestartParams<LP: Clone + Debug + Send + Sync> {
pub inner: LP,
pub restarts: usize,
pub bounds: Bounds,
pub perturbation: f32,
}Expand description
Static configuration for a RandomRestart run.
The total evaluation budget is the product (restarts + 1) * inner.max_iters:
one unperturbed run plus restarts perturbed runs, each bounded by the inner
searcher’s own max_iters. There is no second, outer cap.
§Type parameters
LP: the inner searcher’sParamstype.
Fields§
§inner: LPConfiguration handed to the inner searcher on every run.
restarts: usizeNumber of perturbed restarts in addition to the unperturbed run 0.
Default 2 (so 3 runs total).
Because RandomRestart adds no cap of its own, this directly scales the
total evaluation budget: (restarts + 1) * inner.max_iters total
evaluate_one calls. 0 is valid and reduces to a plain inner run.
bounds: BoundsInclusive search-space bounds (lo, hi); perturbed starts are clamped
here.
perturbation: f32Standard deviation of the Gaussian perturbation applied to the input
genome for runs 1..=restarts. Default 0.1 * (hi - lo).
Implementations§
Source§impl<LP: Clone + Debug + Send + Sync> RandomRestartParams<LP>
impl<LP: Clone + Debug + Send + Sync> RandomRestartParams<LP>
Sourcepub fn default_for(inner: LP, bounds: Bounds) -> Self
pub fn default_for(inner: LP, bounds: Bounds) -> Self
Default parameters: restarts = 2, perturbation = 0.1 * (hi - lo),
wrapping the supplied inner params.
Trait Implementations§
Auto Trait Implementations§
impl<LP> Freeze for RandomRestartParams<LP>where
LP: Freeze,
impl<LP> RefUnwindSafe for RandomRestartParams<LP>where
LP: RefUnwindSafe,
impl<LP> Send for RandomRestartParams<LP>
impl<LP> Sync for RandomRestartParams<LP>
impl<LP> Unpin for RandomRestartParams<LP>where
LP: Unpin,
impl<LP> UnsafeUnpin for RandomRestartParams<LP>where
LP: UnsafeUnpin,
impl<LP> UnwindSafe for RandomRestartParams<LP>where
LP: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more