pub struct TraversalCache { /* private fields */ }Implementations§
Source§impl TraversalCache
impl TraversalCache
pub fn from_topology(topology: &Topology) -> Self
pub fn with_storage(topology: &Topology, requested: TraversalStorage) -> Self
pub const fn node_count(&self) -> usize
pub const fn edge_count(&self) -> usize
pub const fn layout(&self) -> TraversalLayout
pub fn storage_bytes(&self) -> usize
pub fn fast_equivalent_bytes(&self) -> usize
pub fn outgoing_neighbors(&self, node: NodeIndex) -> NeighborIter<'_> ⓘ
pub fn incoming_neighbors(&self, node: NodeIndex) -> NeighborIter<'_> ⓘ
pub fn out_degree(&self, node: NodeIndex) -> Option<usize>
pub fn in_degree(&self, node: NodeIndex) -> Option<usize>
Source§impl TraversalCache
impl TraversalCache
Sourcepub fn bfs_with_workspace<'workspace>(
&self,
start: NodeIndex,
direction: Direction,
workspace: &'workspace mut TraversalCacheWorkspace,
) -> &'workspace [NodeIndex]
pub fn bfs_with_workspace<'workspace>( &self, start: NodeIndex, direction: Direction, workspace: &'workspace mut TraversalCacheWorkspace, ) -> &'workspace [NodeIndex]
Runs a materialized BFS without allocating after the workspace has grown.
Source§impl TraversalCache
impl TraversalCache
Sourcepub fn storage_savings_bytes(&self) -> usize
pub fn storage_savings_bytes(&self) -> usize
Encoded bytes saved against a dual direct-u32 traversal CSR.
Sourcepub fn storage_ratio(&self) -> f64
pub fn storage_ratio(&self) -> f64
Encoded cache size divided by the equivalent direct cache size.
Source§impl TraversalCache
impl TraversalCache
pub fn bfs_iter<'cache, 'workspace>( &'cache self, start: NodeIndex, direction: Direction, workspace: &'workspace mut TraversalCacheWorkspace, ) -> CacheBfs<'cache, 'workspace> ⓘ
pub fn dfs_iter<'cache, 'workspace>( &'cache self, start: NodeIndex, direction: Direction, workspace: &'workspace mut TraversalCacheWorkspace, ) -> CacheDfs<'cache, 'workspace> ⓘ
pub fn bfs(&self, start: NodeIndex, direction: Direction) -> Vec<NodeIndex>
pub fn dfs(&self, start: NodeIndex, direction: Direction) -> Vec<NodeIndex>
pub fn reachable( &self, source: NodeIndex, target: NodeIndex, direction: Direction, ) -> bool
pub fn shortest_path( &self, source: NodeIndex, target: NodeIndex, direction: Direction, workspace: &mut TraversalCacheWorkspace, ) -> Option<Vec<NodeIndex>>
Trait Implementations§
Source§impl Clone for TraversalCache
impl Clone for TraversalCache
Source§fn clone(&self) -> TraversalCache
fn clone(&self) -> TraversalCache
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TraversalCache
impl Debug for TraversalCache
impl Eq for TraversalCache
Source§impl From<&Graph> for TraversalCache
impl From<&Graph> for TraversalCache
Source§impl From<&Topology> for TraversalCache
impl From<&Topology> for TraversalCache
Source§impl PartialEq for TraversalCache
impl PartialEq for TraversalCache
impl StructuralPartialEq for TraversalCache
Auto Trait Implementations§
impl Freeze for TraversalCache
impl RefUnwindSafe for TraversalCache
impl Send for TraversalCache
impl Sync for TraversalCache
impl Unpin for TraversalCache
impl UnsafeUnpin for TraversalCache
impl UnwindSafe for TraversalCache
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