pub struct Jobs { /* private fields */ }Expand description
Stores all jobs taking into account their neighborhood.
Implementations
sourceimpl Jobs
impl Jobs
sourcepub fn new(
fleet: &Fleet,
jobs: Vec<Job>,
transport: &Arc<dyn TransportCost + Send + Sync>
) -> Jobs
pub fn new(
fleet: &Fleet,
jobs: Vec<Job>,
transport: &Arc<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.
sourcepub fn distance(
&self,
profile: &Profile,
from: &Job,
to: &Job,
_: Timestamp
) -> Cost
pub fn distance(
&self,
profile: &Profile,
from: &Job,
to: &Job,
_: Timestamp
) -> Cost
Returns cost distance between two jobs.
Auto Trait Implementations
impl !RefUnwindSafe for Jobs
impl Send for Jobs
impl Sync for Jobs
impl Unpin for Jobs
impl !UnwindSafe for Jobs
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more