pub struct DefectGraphBuilder { /* private fields */ }Expand description
Spatial-hash-accelerated defect graph for efficient neighbor queries.
Defects are binned into cells of side cell_size. Neighbor lookups
scan only the O(1) adjacent cells, giving expected O(1) query time
for sparse defect densities (which is the regime of interest below
threshold).
Implementations§
Source§impl DefectGraphBuilder
impl DefectGraphBuilder
pub fn new(cell_size: u32) -> Self
Sourcepub fn build(&self, syndrome: &SyndromeData, max_radius: u32) -> Vec<DefectEdge>
pub fn build(&self, syndrome: &SyndromeData, max_radius: u32) -> Vec<DefectEdge>
Build a defect graph using spatial hashing for O(1) neighbor lookup.
Returns edges connecting each defect to its nearest neighbors
within max_radius Manhattan distance.
Auto Trait Implementations§
impl Freeze for DefectGraphBuilder
impl RefUnwindSafe for DefectGraphBuilder
impl Send for DefectGraphBuilder
impl Sync for DefectGraphBuilder
impl Unpin for DefectGraphBuilder
impl UnsafeUnpin for DefectGraphBuilder
impl UnwindSafe for DefectGraphBuilder
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