pub trait Director<S: PlanningSolution>: 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::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 fresh_score(&self) -> Option<S::Score> { ... }
fn constraint_is_hard(&self, constraint_ref: &ConstraintRef) -> Option<bool> { ... }
fn is_incremental(&self) -> bool { ... }
fn snapshot_score_state(&self) -> DirectorScoreState<S::Score> { ... }
fn restore_score_state(&mut self, state: DirectorScoreState<S::Score>) { ... }
fn reset(&mut self) { ... }
}Required Methods§
fn working_solution(&self) -> &S
fn working_solution_mut(&mut self) -> &mut S
fn calculate_score(&mut self) -> S::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 fresh_score(&self) -> Option<S::Score>
fn constraint_is_hard(&self, constraint_ref: &ConstraintRef) -> Option<bool>
fn is_incremental(&self) -> bool
fn snapshot_score_state(&self) -> DirectorScoreState<S::Score>
fn restore_score_state(&mut self, state: DirectorScoreState<S::Score>)
fn reset(&mut self)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".