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,
logger: &InfoLogger,
) -> GenericResult<Jobs>
pub fn new( fleet: &Fleet, jobs: Vec<Job>, transport: &dyn TransportCost, logger: &InfoLogger, ) -> GenericResult<Jobs>
Creates a new instance of 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.
Sourcepub fn clusters(&self) -> &[HashSet<Job>]
pub fn clusters(&self) -> &[HashSet<Job>]
Returns job clusters based on their neighborhood approximation.
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