pub struct ListVariableMetadata<S, DM, IDM> {
pub cross_distance_meter: DM,
pub intra_distance_meter: IDM,
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§
§cross_distance_meter: DM§intra_distance_meter: IDM§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, DM, IDM> ListVariableMetadata<S, DM, IDM>
impl<S, DM, IDM> ListVariableMetadata<S, DM, IDM>
pub fn new( cross_distance_meter: DM, intra_distance_meter: IDM, 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
Auto Trait Implementations§
impl<S, DM, IDM> Freeze for ListVariableMetadata<S, DM, IDM>
impl<S, DM, IDM> RefUnwindSafe for ListVariableMetadata<S, DM, IDM>where
DM: RefUnwindSafe,
IDM: RefUnwindSafe,
impl<S, DM, IDM> Send for ListVariableMetadata<S, DM, IDM>
impl<S, DM, IDM> Sync for ListVariableMetadata<S, DM, IDM>
impl<S, DM, IDM> Unpin for ListVariableMetadata<S, DM, IDM>
impl<S, DM, IDM> UnsafeUnpin for ListVariableMetadata<S, DM, IDM>where
DM: UnsafeUnpin,
IDM: UnsafeUnpin,
impl<S, DM, IDM> UnwindSafe for ListVariableMetadata<S, 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> 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