Skip to main content

DirectorTrait

Trait DirectorTrait 

Source
pub trait DirectorTrait<S>: Send{
Show 16 methods // Required methods fn working_solution(&self) -> &S; fn working_solution_mut(&mut self) -> &mut S; fn calculate_score(&mut self) -> <S as PlanningSolution>::Score; fn solution_descriptor(&self) -> &SolutionDescriptor; fn clone_working_solution(&self) -> S; fn before_variable_changed( &mut self, descriptor_index: usize, entity_index: usize, ); fn after_variable_changed( &mut self, descriptor_index: usize, entity_index: usize, ); fn entity_count(&self, descriptor_index: usize) -> Option<usize>; fn total_entity_count(&self) -> Option<usize>; fn constraint_metadata(&self) -> Vec<ConstraintMetadata<'_>>; // Provided methods fn constraint_is_hard(&self, constraint_ref: &ConstraintRef) -> Option<bool> { ... } fn is_incremental(&self) -> bool { ... } fn snapshot_score_state( &self, ) -> DirectorScoreState<<S as PlanningSolution>::Score> { ... } fn restore_score_state( &mut self, state: DirectorScoreState<<S as PlanningSolution>::Score>, ) { ... } fn reset(&mut self) { ... } fn register_undo(&mut self, _undo: Box<dyn FnOnce(&mut S) + Send>) { ... }
}

Required Methods§

Source

fn working_solution(&self) -> &S

Source

fn working_solution_mut(&mut self) -> &mut S

Source

fn calculate_score(&mut self) -> <S as PlanningSolution>::Score

Source

fn solution_descriptor(&self) -> &SolutionDescriptor

Source

fn clone_working_solution(&self) -> S

Source

fn before_variable_changed( &mut self, descriptor_index: usize, entity_index: usize, )

Source

fn after_variable_changed( &mut self, descriptor_index: usize, entity_index: usize, )

Source

fn entity_count(&self, descriptor_index: usize) -> Option<usize>

Source

fn total_entity_count(&self) -> Option<usize>

Source

fn constraint_metadata(&self) -> Vec<ConstraintMetadata<'_>>

Provided Methods§

Implementors§

Source§

impl<S, C> Director<S> for ScoreDirector<S, C>

Source§

impl<S, D> Director<S> for RecordingDirector<'_, S, D>
where S: PlanningSolution, D: Director<S>,