Struct gardiz::graph::PathMakerBuf  
source · pub struct PathMakerBuf<T>where
    T: Clone + Hash + Ord + Zero + One + AddAssign + CheckedAdd + CheckedSub,{ /* private fields */ }Expand description
A buffer for an A* search algorithm useful for saving a few deallocations
and allocations when performing lots of searches. See Graph::make_path.
Implementations§
source§impl<T> PathMakerBuf<T>where
    T: Clone + Hash + Ord + Zero + One + AddAssign + CheckedAdd + CheckedSub,
 
impl<T> PathMakerBuf<T>where T: Clone + Hash + Ord + Zero + One + AddAssign + CheckedAdd + CheckedSub,
sourcepub fn make_path<'graph, 'points, F>(
    &mut self,
    graph: &'graph mut Graph<T>,
    start: &'points Vec2<T>,
    goal: &'points Vec2<T>,
    penalty: &'points T,
    valid_points: F
) -> Option<Vec<DirecVector<T>>>where
    T: Clone + Zero + One + AddAssign + AddAssign<&'points T>,
    F: FnMut(&Vec2<T>) -> bool,
 
pub fn make_path<'graph, 'points, F>( &mut self, graph: &'graph mut Graph<T>, start: &'points Vec2<T>, goal: &'points Vec2<T>, penalty: &'points T, valid_points: F ) -> Option<Vec<DirecVector<T>>>where T: Clone + Zero + One + AddAssign + AddAssign<&'points T>, F: FnMut(&Vec2<T>) -> bool,
Performs the A* search algorithm using this buffer. See
Graph::make_path.
Trait Implementations§
source§impl<T> Clone for PathMakerBuf<T>where
    T: Clone + Hash + Ord + Zero + One + AddAssign + CheckedAdd + CheckedSub + Clone,
 
impl<T> Clone for PathMakerBuf<T>where T: Clone + Hash + Ord + Zero + One + AddAssign + CheckedAdd + CheckedSub + Clone,
source§fn clone(&self) -> PathMakerBuf<T>
 
fn clone(&self) -> PathMakerBuf<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moresource§impl<T> Debug for PathMakerBuf<T>where
    T: Clone + Hash + Ord + Zero + One + AddAssign + CheckedAdd + CheckedSub + Debug,
 
impl<T> Debug for PathMakerBuf<T>where T: Clone + Hash + Ord + Zero + One + AddAssign + CheckedAdd + CheckedSub + Debug,
Auto Trait Implementations§
impl<T> RefUnwindSafe for PathMakerBuf<T>where T: RefUnwindSafe,
impl<T> Send for PathMakerBuf<T>where T: Send,
impl<T> Sync for PathMakerBuf<T>where T: Sync,
impl<T> Unpin for PathMakerBuf<T>where T: Unpin,
impl<T> UnwindSafe for PathMakerBuf<T>where T: UnwindSafe,
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