pub struct CsrIndex { /* private fields */ }Expand description
flat csr adjacency over chunk ordinals. offsets[node..node+1] bounds
node’s run in neighbors (and edge_types), so one node’s neighbors are
a contiguous &[u32] slice.
Implementations§
Source§impl CsrIndex
impl CsrIndex
Sourcepub fn from_bytes(
bytes: &[u8],
n_embeddings: usize,
) -> Result<Self, RuntimeError>
pub fn from_bytes( bytes: &[u8], n_embeddings: usize, ) -> Result<Self, RuntimeError>
parse a graph_adjacency csr payload. n_embeddings is the corpus
chunk count; the csr’s n_nodes must match it so neighbor ids index
the same ordinal space as the embeddings.
pub fn n_nodes(&self) -> usize
Auto Trait Implementations§
impl Freeze for CsrIndex
impl RefUnwindSafe for CsrIndex
impl Send for CsrIndex
impl Sync for CsrIndex
impl Unpin for CsrIndex
impl UnsafeUnpin for CsrIndex
impl UnwindSafe for CsrIndex
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