pub struct ListVariableSlot<S, V, DM, IDM> {Show 26 fields
pub entity_type_name: &'static str,
pub element_count: fn(&S) -> usize,
pub assigned_elements: fn(&S) -> Vec<V>,
pub list_len: fn(&S, usize) -> usize,
pub list_remove: fn(&mut S, usize, usize) -> Option<V>,
pub construction_list_remove: fn(&mut S, usize, usize) -> V,
pub list_insert: fn(&mut S, usize, usize, V),
pub list_get: fn(&S, usize, usize) -> Option<V>,
pub list_set: fn(&mut S, usize, usize, V),
pub list_reverse: fn(&mut S, usize, usize, usize),
pub sublist_remove: fn(&mut S, usize, usize, usize) -> Vec<V>,
pub sublist_insert: fn(&mut S, usize, usize, Vec<V>),
pub ruin_remove: fn(&mut S, usize, usize) -> V,
pub ruin_insert: fn(&mut S, usize, usize, V),
pub index_to_element: fn(&S, usize) -> V,
pub entity_count: fn(&S) -> usize,
pub cross_distance_meter: DM,
pub intra_distance_meter: IDM,
pub variable_name: &'static str,
pub descriptor_index: usize,
pub route_get_fn: Option<fn(&S, usize) -> Vec<usize>>,
pub route_set_fn: Option<fn(&mut S, usize, Vec<usize>)>,
pub route_depot_fn: Option<fn(&S, usize) -> usize>,
pub route_metric_class_fn: Option<fn(&S, usize) -> usize>,
pub route_distance_fn: Option<fn(&S, usize, usize, usize) -> i64>,
pub route_feasible_fn: Option<fn(&S, usize, &[usize]) -> bool>,
/* private fields */
}Fields§
§entity_type_name: &'static str§element_count: fn(&S) -> usize§assigned_elements: fn(&S) -> Vec<V>§list_len: fn(&S, usize) -> usize§list_remove: fn(&mut S, usize, usize) -> Option<V>§construction_list_remove: fn(&mut S, usize, usize) -> V§list_insert: fn(&mut S, usize, usize, V)§list_get: fn(&S, usize, usize) -> Option<V>§list_set: fn(&mut S, usize, usize, V)§list_reverse: fn(&mut S, usize, usize, usize)§sublist_remove: fn(&mut S, usize, usize, usize) -> Vec<V>§sublist_insert: fn(&mut S, usize, usize, Vec<V>)§ruin_remove: fn(&mut S, usize, usize) -> V§ruin_insert: fn(&mut S, usize, usize, V)§index_to_element: fn(&S, usize) -> V§entity_count: fn(&S) -> usize§cross_distance_meter: DM§intra_distance_meter: IDM§variable_name: &'static str§descriptor_index: usize§route_get_fn: Option<fn(&S, usize) -> Vec<usize>>§route_set_fn: Option<fn(&mut S, usize, Vec<usize>)>§route_depot_fn: Option<fn(&S, usize) -> usize>§route_metric_class_fn: Option<fn(&S, usize) -> usize>§route_distance_fn: Option<fn(&S, usize, usize, usize) -> i64>§route_feasible_fn: Option<fn(&S, usize, &[usize]) -> bool>Implementations§
Source§impl<S, V, DM, IDM> ListVariableSlot<S, V, DM, IDM>
impl<S, V, DM, IDM> ListVariableSlot<S, V, DM, IDM>
pub fn new( entity_type_name: &'static str, element_count: fn(&S) -> usize, assigned_elements: fn(&S) -> Vec<V>, list_len: fn(&S, usize) -> usize, list_remove: fn(&mut S, usize, usize) -> Option<V>, construction_list_remove: fn(&mut S, usize, usize) -> V, list_insert: fn(&mut S, usize, usize, V), list_get: fn(&S, usize, usize) -> Option<V>, list_set: fn(&mut S, usize, usize, V), list_reverse: fn(&mut S, usize, usize, usize), sublist_remove: fn(&mut S, usize, usize, usize) -> Vec<V>, sublist_insert: fn(&mut S, usize, usize, Vec<V>), ruin_remove: fn(&mut S, usize, usize) -> V, ruin_insert: fn(&mut S, usize, usize, V), index_to_element: fn(&S, usize) -> V, entity_count: fn(&S) -> usize, cross_distance_meter: DM, intra_distance_meter: IDM, variable_name: &'static str, descriptor_index: usize, route_get_fn: Option<fn(&S, usize) -> Vec<usize>>, route_set_fn: Option<fn(&mut S, usize, Vec<usize>)>, route_depot_fn: Option<fn(&S, usize) -> usize>, route_metric_class_fn: Option<fn(&S, usize) -> usize>, route_distance_fn: Option<fn(&S, usize, usize, usize) -> i64>, route_feasible_fn: Option<fn(&S, usize, &[usize]) -> bool>, ) -> Self
pub fn matches_target( &self, entity_class: Option<&str>, variable_name: Option<&str>, ) -> bool
pub fn has_unassigned_elements(&self, solution: &S) -> bool
pub fn has_list_content(&self, solution: &S) -> bool
pub fn supports_clarke_wright(&self) -> bool
pub fn supports_k_opt(&self) -> bool
pub fn supports_ruin(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<S, V, DM, IDM> Freeze for ListVariableSlot<S, V, DM, IDM>
impl<S, V, DM, IDM> RefUnwindSafe for ListVariableSlot<S, V, DM, IDM>where
DM: RefUnwindSafe,
IDM: RefUnwindSafe,
impl<S, V, DM, IDM> Send for ListVariableSlot<S, V, DM, IDM>
impl<S, V, DM, IDM> Sync for ListVariableSlot<S, V, DM, IDM>
impl<S, V, DM, IDM> Unpin for ListVariableSlot<S, V, DM, IDM>
impl<S, V, DM, IDM> UnsafeUnpin for ListVariableSlot<S, V, DM, IDM>where
DM: UnsafeUnpin,
IDM: UnsafeUnpin,
impl<S, V, DM, IDM> UnwindSafe for ListVariableSlot<S, V, DM, IDM>where
DM: UnwindSafe,
IDM: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more