pub struct GraphSearchScratch { /* private fields */ }Expand description
Owned, lifetime-free reusable state for single-core graph queries.
Implementations§
Source§impl GraphSearchScratch
impl GraphSearchScratch
Sourcepub fn new(node_count: u32, max_degree: u8) -> Result<Self, GraphSearchError>
pub fn new(node_count: u32, max_degree: u8) -> Result<Self, GraphSearchError>
Allocates the node-count and maximum-degree state that is independent of ef.
Sourcepub fn allocation_bytes(
node_count: u32,
max_degree: u8,
ef: usize,
) -> Result<usize, GraphSearchError>
pub fn allocation_bytes( node_count: u32, max_degree: u8, ef: usize, ) -> Result<usize, GraphSearchError>
Returns the exact requested bytes for one scratch at the supplied geometry.
Sourcepub fn resident_bytes(&self) -> Result<usize, GraphSearchError>
pub fn resident_bytes(&self) -> Result<usize, GraphSearchError>
Returns the exact capacities, in bytes, of every owned scratch vector.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphSearchScratch
impl RefUnwindSafe for GraphSearchScratch
impl Send for GraphSearchScratch
impl Sync for GraphSearchScratch
impl Unpin for GraphSearchScratch
impl UnsafeUnpin for GraphSearchScratch
impl UnwindSafe for GraphSearchScratch
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