pub struct MinimalDistance<'a> { /* private fields */ }Expand description
Calculation of minimum distance from one part of the grammar to another. Similar to multi-source shortest path search in a graph.
Implementations§
Source§impl<'a> MinimalDistance<'a>
impl<'a> MinimalDistance<'a>
Sourcepub fn distances(&self) -> &[Vec<Option<u32>>]
pub fn distances(&self) -> &[Vec<Option<u32>>]
Returns distances in order respective to the order of rule iteration.
Sourcepub fn minimal_distances(
&mut self,
dots: &[(usize, usize)],
direction: DistanceDirection,
) -> &[Vec<Option<u32>>]
pub fn minimal_distances( &mut self, dots: &[(usize, usize)], direction: DistanceDirection, ) -> &[Vec<Option<u32>>]
Calculates minimal distance from one parts of the grammar to others. Returns distances in order respective to the order of rule iteration.
Auto Trait Implementations§
impl<'a> Freeze for MinimalDistance<'a>
impl<'a> !RefUnwindSafe for MinimalDistance<'a>
impl<'a> !Send for MinimalDistance<'a>
impl<'a> !Sync for MinimalDistance<'a>
impl<'a> Unpin for MinimalDistance<'a>
impl<'a> !UnwindSafe for MinimalDistance<'a>
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