pub struct QueuedEntityPlacer<S, V>where
S: PlanningSolution,{ /* private fields */ }Expand description
A queued entity placer that processes entities in order.
For each uninitialized entity, generates change moves for all possible values. Uses typed function pointers for zero-erasure access.
§Type Parameters
S- The planning solution typeV- The value type
Implementations§
Source§impl<S, V> QueuedEntityPlacer<S, V>where
S: PlanningSolution,
impl<S, V> QueuedEntityPlacer<S, V>where
S: PlanningSolution,
Sourcepub fn new(
entity_selector: Box<dyn EntitySelector<S>>,
value_selector: Box<dyn TypedValueSelector<S, V>>,
getter: fn(&S, usize) -> Option<V>,
setter: fn(&mut S, usize, Option<V>),
descriptor_index: usize,
variable_name: &'static str,
) -> Self
pub fn new( entity_selector: Box<dyn EntitySelector<S>>, value_selector: Box<dyn TypedValueSelector<S, V>>, getter: fn(&S, usize) -> Option<V>, setter: fn(&mut S, usize, Option<V>), descriptor_index: usize, variable_name: &'static str, ) -> Self
Creates a new queued entity placer with typed function pointers.
Trait Implementations§
Source§impl<S, V> Debug for QueuedEntityPlacer<S, V>where
S: PlanningSolution,
impl<S, V> Debug for QueuedEntityPlacer<S, V>where
S: PlanningSolution,
Source§impl<S, V> EntityPlacer<S, ChangeMove<S, V>> for QueuedEntityPlacer<S, V>
impl<S, V> EntityPlacer<S, ChangeMove<S, V>> for QueuedEntityPlacer<S, V>
Source§fn get_placements(
&self,
score_director: &dyn ScoreDirector<S>,
) -> Vec<Placement<S, ChangeMove<S, V>>>
fn get_placements( &self, score_director: &dyn ScoreDirector<S>, ) -> Vec<Placement<S, ChangeMove<S, V>>>
Returns all placements (entities + their candidate moves).
Auto Trait Implementations§
impl<S, V> Freeze for QueuedEntityPlacer<S, V>
impl<S, V> !RefUnwindSafe for QueuedEntityPlacer<S, V>
impl<S, V> Send for QueuedEntityPlacer<S, V>
impl<S, V> !Sync for QueuedEntityPlacer<S, V>
impl<S, V> Unpin for QueuedEntityPlacer<S, V>
impl<S, V> !UnwindSafe for QueuedEntityPlacer<S, V>
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