Struct vrp_core::models::solution::Tour [−][src]
Represents a tour, a smart container for jobs with their associated activities.
Implementations
impl Tour[src]
pub fn new(actor: &Actor) -> Self[src]
Creates a new tour with start and optional end using actor properties.
pub fn set_start(&mut self, activity: Activity) -> &mut Tour[src]
Sets tour start.
pub fn set_end(&mut self, activity: Activity) -> &mut Tour[src]
Sets tour end.
pub fn insert_last(&mut self, activity: Activity) -> &mut Tour[src]
Inserts activity within its job to the end of tour.
pub fn insert_at(&mut self, activity: Activity, index: usize) -> &mut Tour[src]
Inserts activity within its job at specified index.
pub fn remove(&mut self, job: &Job) -> bool[src]
Removes job within its activities from the tour.
pub fn remove_activity_at(&mut self, idx: usize) -> Job[src]
Removes activity and its job from the tour.
pub fn all_activities(&self) -> Iter<'_, Activity>[src]
Returns all activities in tour.
pub fn activities_slice(&self, start: usize, end: usize) -> &[Activity][src]
Returns activities slice in specific range (all inclusive).
pub fn all_activities_mut(&mut self) -> IterMut<'_, Activity>[src]
Returns all activities in tour as mutable.
pub fn job_activities<'a>(
&'a self,
job: &'a Job
) -> impl Iterator<Item = &Activity> + 'a[src]
&'a self,
job: &'a Job
) -> impl Iterator<Item = &Activity> + 'a
Returns all activities in tour for specific job.
pub fn legs<'a>(
&'a self
) -> Box<dyn Iterator<Item = (&'a [Activity], usize)> + 'a>[src]
&'a self
) -> Box<dyn Iterator<Item = (&'a [Activity], usize)> + 'a>
Returns counted tour legs.
pub fn jobs(&self) -> impl Iterator<Item = Job> + '_[src]
Returns all jobs.
pub fn get(&self, index: usize) -> Option<&Activity>[src]
Returns activity by its index in tour.
pub fn get_mut(&mut self, index: usize) -> Option<&mut Activity>[src]
Returns mutable activity by its index in tour.
pub fn start(&self) -> Option<&Activity>[src]
Returns start activity in tour.
pub fn end(&self) -> Option<&Activity>[src]
Returns end activity in tour.
pub fn contains(&self, job: &Job) -> bool[src]
Checks whether job is present in tour
pub fn index(&self, job: &Job) -> Option<usize>[src]
Returns index of first job occurrence in the tour.
pub fn has_jobs(&self) -> bool[src]
Checks whether tour has jobs.
pub fn activity_count(&self) -> usize[src]
Returns amount of job activities.
pub fn total(&self) -> usize[src]
Returns amount of all activities in tour.
pub fn job_count(&self) -> usize[src]
Returns amount of jobs.
pub fn deep_copy(&self) -> Tour[src]
Creates a copy of existing tour deeply copying all activities and jobs.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Tour[src]
impl Send for Tour[src]
impl Sync for Tour[src]
impl Unpin for Tour[src]
impl !UnwindSafe for Tour[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,