pub struct MemmapGraph { /* private fields */ }Expand description
Memory-mapped graph for extremely large graphs that don’t fit in RAM
Implementations§
Source§impl MemmapGraph
impl MemmapGraph
Sourcepub fn from_csr<P: AsRef<Path>>(csr: &CSRGraph, path: P) -> Result<Self>
pub fn from_csr<P: AsRef<Path>>(csr: &CSRGraph, path: P) -> Result<Self>
Create a new memory-mapped graph from an existing CSR graph
Sourcepub fn neighbors(&mut self, node: usize) -> Result<Vec<(usize, f64)>>
pub fn neighbors(&mut self, node: usize) -> Result<Vec<(usize, f64)>>
Get neighbors of a node (reads from disk)
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Get number of nodes
Sourcepub fn edge_count(&self) -> usize
pub fn edge_count(&self) -> usize
Get number of edges
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemmapGraph
impl RefUnwindSafe for MemmapGraph
impl Send for MemmapGraph
impl Sync for MemmapGraph
impl Unpin for MemmapGraph
impl UnwindSafe for MemmapGraph
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more