pub struct GraphNodeLayout { /* private fields */ }Expand description
Validated geometry shared by every node block in one region.
Implementations§
Source§impl GraphNodeLayout
impl GraphNodeLayout
Sourcepub fn new(
dims: u32,
padded_dims: u32,
max_degree: u8,
) -> Result<Self, GraphNodeError>
pub fn new( dims: u32, padded_dims: u32, max_degree: u8, ) -> Result<Self, GraphNodeError>
Derives the frozen stride from logical/padded dimensions and maximum degree.
Sourcepub const fn padded_dims(self) -> u32
pub const fn padded_dims(self) -> u32
Returns the stored, zero-padded vector dimension.
Sourcepub const fn max_degree(self) -> u8
pub const fn max_degree(self) -> u8
Returns the fixed neighbour-slot capacity.
Sourcepub const fn code_bytes(self) -> usize
pub const fn code_bytes(self) -> usize
Returns packed Bit4 bytes stored at the start of every block.
Sourcepub const fn stride(self) -> u32
pub const fn stride(self) -> u32
Returns the cache-line-rounded bytes between adjacent node ids.
Sourcepub fn block_offset(self, node_id: u32) -> Result<u32, GraphNodeError>
pub fn block_offset(self, node_id: u32) -> Result<u32, GraphNodeError>
Returns the byte offset for a dense segment-local node/row id.
Trait Implementations§
Source§impl Clone for GraphNodeLayout
impl Clone for GraphNodeLayout
impl Copy for GraphNodeLayout
Source§impl Debug for GraphNodeLayout
impl Debug for GraphNodeLayout
impl Eq for GraphNodeLayout
Source§impl PartialEq for GraphNodeLayout
impl PartialEq for GraphNodeLayout
impl StructuralPartialEq for GraphNodeLayout
Auto Trait Implementations§
impl Freeze for GraphNodeLayout
impl RefUnwindSafe for GraphNodeLayout
impl Send for GraphNodeLayout
impl Sync for GraphNodeLayout
impl Unpin for GraphNodeLayout
impl UnsafeUnpin for GraphNodeLayout
impl UnwindSafe for GraphNodeLayout
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