pub struct ModifyOptimizer<M, U> {
pub modifier: M,
pub utility: U,
pub tries: usize,
pub depth: usize,
}
Expand description
Modifies an object using a modifier by maximizing utility.
Fields§
§modifier: M
The modifier to modify the object.
utility: U
The measured utility.
tries: usize
The number of tries before giving up.
depth: usize
The number of repeated modifications before backtracking.
Trait Implementations§
Source§impl<T, M, U> Modifier<T> for ModifyOptimizer<M, U>
impl<T, M, U> Modifier<T> for ModifyOptimizer<M, U>
Source§fn modify(&mut self, obj: &mut T) -> Self::Change
fn modify(&mut self, obj: &mut T) -> Self::Change
Modify an object and return the change. Read more
Source§fn undo(&mut self, change: &Self::Change, obj: &mut T)
fn undo(&mut self, change: &Self::Change, obj: &mut T)
Undo change made to an object. Read more
Source§fn redo(&mut self, change: &Self::Change, obj: &mut T)
fn redo(&mut self, change: &Self::Change, obj: &mut T)
Redo change made to an object. Read more
Source§fn undo_meaning(&mut self, _change: &Self::Change)
fn undo_meaning(&mut self, _change: &Self::Change)
Undo meaning change in the modifier introduced by a change. Read more
Source§fn redo_meaning(&mut self, _change: &Self::Change)
fn redo_meaning(&mut self, _change: &Self::Change)
Redo meaning change in the modifier. Read more
Auto Trait Implementations§
impl<M, U> Freeze for ModifyOptimizer<M, U>
impl<M, U> RefUnwindSafe for ModifyOptimizer<M, U>where
M: RefUnwindSafe,
U: RefUnwindSafe,
impl<M, U> Send for ModifyOptimizer<M, U>
impl<M, U> Sync for ModifyOptimizer<M, U>
impl<M, U> Unpin for ModifyOptimizer<M, U>
impl<M, U> UnwindSafe for ModifyOptimizer<M, U>where
M: UnwindSafe,
U: 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