Struct utility_programming::ModifyOptimizer
[−]
[src]
pub struct ModifyOptimizer<M, U> {
pub modifier: M,
pub utility: U,
pub tries: usize,
pub depth: usize,
}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
impl<T, M, U> Modifier<T> for ModifyOptimizer<M, U> where
M: Modifier<T>,
U: Utility<T>,
M::Change: Clone, [src]
M: Modifier<T>,
U: Utility<T>,
M::Change: Clone,
type Change = Vec<M::Change>
The change applied to an object.
fn modify(&mut self, obj: &mut T) -> Self::Change[src]
Modify an object and return the change. Read more
fn undo(&mut self, change: &Self::Change, obj: &mut T)[src]
Undo change made to an object. Read more
fn redo(&mut self, change: &Self::Change, obj: &mut T)[src]
Redo change made to an object. Read more
Auto Trait Implementations
impl<M, U> Send for ModifyOptimizer<M, U> where
M: Send,
U: Send,
M: Send,
U: Send,
impl<M, U> Sync for ModifyOptimizer<M, U> where
M: Sync,
U: Sync,
M: Sync,
U: Sync,