pub struct ComplexityScheduler<T: Float + Debug + Send + Sync + 'static> {
pub current_complexity: T,
pub max_complexity: T,
pub increase_rate: T,
pub strategy: SchedulingStrategy,
}Expand description
Complexity scheduler for progressive search
Fields§
§current_complexity: TCurrent complexity level
max_complexity: TMaximum complexity
increase_rate: TComplexity increase rate
strategy: SchedulingStrategyScheduling strategy
Implementations§
Source§impl<T: Float + Debug + Send + Sync + 'static> ComplexityScheduler<T>
impl<T: Float + Debug + Send + Sync + 'static> ComplexityScheduler<T>
Sourcepub fn update_complexity(&mut self, phase: SearchPhase) -> Result<T>
pub fn update_complexity(&mut self, phase: SearchPhase) -> Result<T>
Update complexity for phase and return the new level.
Every SchedulingStrategy is implemented. StepWise and Adaptive used
to fall into a _ => {} arm that silently returned the previous value, so a
caller selecting either got a complexity budget frozen at its initial 0.1
for the whole search while the phases advanced around it. Fallible for the
same reason: keeping the previous level on a conversion failure would
reintroduce exactly that frozen budget, and there is no other value that is
not a guess.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ComplexityScheduler<T>where
T: Freeze,
impl<T> RefUnwindSafe for ComplexityScheduler<T>where
T: RefUnwindSafe,
impl<T> Send for ComplexityScheduler<T>
impl<T> Sync for ComplexityScheduler<T>
impl<T> Unpin for ComplexityScheduler<T>where
T: Unpin,
impl<T> UnsafeUnpin for ComplexityScheduler<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ComplexityScheduler<T>where
T: 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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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