pub struct Traversal { /* private fields */ }Expand description
reusable traversal scratch. allocate once per CsrIndex, reuse across
queries; bounded_bfs bumps the generation so stale stamps read as
unvisited without clearing the buffer.
Implementations§
Source§impl Traversal
impl Traversal
pub fn new(n_nodes: usize) -> Self
Sourcepub fn bounded_bfs(
&mut self,
csr: &CsrIndex,
seeds: &[usize],
hops: usize,
max_frontier: usize,
) -> Vec<usize>
pub fn bounded_bfs( &mut self, csr: &CsrIndex, seeds: &[usize], hops: usize, max_frontier: usize, ) -> Vec<usize>
bounded bfs from seeds, expanding up to hops levels of the csr and
capping the total returned candidate count at max_frontier. returns
a deduped Vec<usize> of chunk ordinals (seeds first, in arrival
order). pure integer, no scoring.
Auto Trait Implementations§
impl Freeze for Traversal
impl RefUnwindSafe for Traversal
impl Send for Traversal
impl Sync for Traversal
impl Unpin for Traversal
impl UnsafeUnpin for Traversal
impl UnwindSafe for Traversal
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