pub trait PillarSelector<S: PlanningSolution>: Send + Debug {
// Required methods
fn iter<'a, D: ScoreDirector<S>>(
&'a self,
score_director: &'a D,
) -> impl Iterator<Item = Pillar> + 'a;
fn size<D: ScoreDirector<S>>(&self, score_director: &D) -> usize;
fn descriptor_index(&self) -> usize;
// Provided method
fn is_never_ending(&self) -> bool { ... }
}Expand description
Trait for selecting pillars of entities.
A pillar selector groups entities by their variable values and returns groups (pillars) that can be moved together.
§Type Parameters
S- The planning solution type
Required Methods§
Sourcefn iter<'a, D: ScoreDirector<S>>(
&'a self,
score_director: &'a D,
) -> impl Iterator<Item = Pillar> + 'a
fn iter<'a, D: ScoreDirector<S>>( &'a self, score_director: &'a D, ) -> impl Iterator<Item = Pillar> + 'a
Returns an iterator over pillars.
Each pillar contains entity references for entities that share the same variable value.
Sourcefn size<D: ScoreDirector<S>>(&self, score_director: &D) -> usize
fn size<D: ScoreDirector<S>>(&self, score_director: &D) -> usize
Returns the approximate number of pillars.
Sourcefn descriptor_index(&self) -> usize
fn descriptor_index(&self) -> usize
Returns the descriptor index this selector operates on.
Provided Methods§
Sourcefn is_never_ending(&self) -> bool
fn is_never_ending(&self) -> bool
Returns true if this selector may return the same pillar multiple times.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.