pub struct Jobs { /* private fields */ }
Expand description
Stores all jobs taking into account their neighborhood.
Implementations§
source§impl Jobs
impl Jobs
sourcepub fn new(
fleet: &Fleet,
jobs: Vec<Job>,
transport: &(dyn TransportCost + Send + Sync),
) -> Jobs
pub fn new( fleet: &Fleet, jobs: Vec<Job>, transport: &(dyn TransportCost + Send + Sync), ) -> Jobs
Creates a new Jobs
.
sourcepub fn neighbors(
&self,
profile: &Profile,
job: &Job,
_: Timestamp,
) -> impl Iterator<Item = (&Job, Cost)>
pub fn neighbors( &self, profile: &Profile, job: &Job, _: Timestamp, ) -> impl Iterator<Item = (&Job, Cost)>
Returns range of jobs “near” to given one. Near is defined by costs with relation transport profile and departure time.
Auto Trait Implementations§
impl Freeze for Jobs
impl !RefUnwindSafe for Jobs
impl Send for Jobs
impl Sync for Jobs
impl Unpin for Jobs
impl !UnwindSafe for Jobs
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> 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