pub struct CSR { /* private fields */ }
Implementations
sourceimpl CSR
impl CSR
pub fn get_vtxprop(&self) -> &[f64]
pub fn get_mut_vtxprop(&mut self) -> &mut [f64]
pub fn get_v(&self) -> usize
pub fn get_e(&self) -> usize
pub fn get_offsets(&self) -> &Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_neighbs(&self) -> &[usize]
sourcepub fn random_el(numv: usize, maxe: usize) -> Vec<(usize, usize)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn random_el(numv: usize, maxe: usize) -> Vec<(usize, usize)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Build a random edge list This method returns a tuple of the number of vertices seen and the edge list el.len() is the number of edges.
sourcepub fn el_from_file(path: &str) -> (usize, Vec<(usize, usize)>)
pub fn el_from_file(path: &str) -> (usize, Vec<(usize, usize)>)
Build an edge list from a file containing text describing one. The file format is line oriented and human readable: v0,v1 v0,v2 v0,v3 v0,v3 v1,v2 v1,v2 v2,v3 v3,v1 …
This method returns a tuple of the number of vertices seen and the edge list el.len() is the number of edges.
pub fn new_from_el_mmap(v: usize, f: String) -> CSR
sourcepub fn new(numv: usize, el: Vec<(usize, usize)>) -> CSR
pub fn new(numv: usize, el: Vec<(usize, usize)>) -> CSR
Take an edge list in and produce a CSR out (u,v)
sourcepub fn vtx_offset_range(&self, v: usize) -> (usize, usize)
pub fn vtx_offset_range(&self, v: usize) -> (usize, usize)
Get the range of offsets into the neighbs array that hold the neighbors of vertex v
sourcepub fn read_only_scan(&self, f: impl FnMut(usize, usize))
pub fn read_only_scan(&self, f: impl FnMut(usize, usize))
read_only_scan is a read only scan of all edges in the entire CSR that accepts a FnMut(usize,usize,u64) -> () to apply to each vertex
pub fn write_fastcsr(&self, s: String)
sourcepub fn bfs_traversal(&self, start: usize, f: impl FnMut(usize))
pub fn bfs_traversal(&self, start: usize, f: impl FnMut(usize))
bfs_traversal starts from vertex start and does a breadth first search traversal on the vertices, applying f, the closure passed in, to each vertex
pub fn par_scan(
&mut self,
par_level: usize,
f: impl Fn(usize, &[usize]) -> f64 + Sync
)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CSR
impl Send for CSR
impl Sync for CSR
impl Unpin for CSR
impl UnwindSafe for CSR
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more