pub struct BondTableBuilder { /* private fields */ }Expand description
Deterministic bond-table construction with endpoint deduplication.
Records accumulate in insertion order and are sorted and deduplicated once
at finish. A tree keyed on the endpoint pair would allocate a node per
bond, which at billions of bonds dominates the build; an amortised push plus
a single sort produces the same ordering for a fraction of the work.
Implementations§
Source§impl BondTableBuilder
impl BondTableBuilder
Sourcepub fn push(&mut self, record: BondRecord)
pub fn push(&mut self, record: BondRecord)
Adds an undirected edge. The first assignment wins on duplicates.
Self-edges are retained so structure validation can report them rather than silently changing the caller’s data.
Sourcepub fn finish_with_availability(self, available: bool) -> BondTable
pub fn finish_with_availability(self, available: bool) -> BondTable
Packs records while preserving whether the complete graph is known.
A merge can retain explicit edges from one input while marking the combined graph unavailable because another input carried no connectivity.
Trait Implementations§
Source§impl Debug for BondTableBuilder
impl Debug for BondTableBuilder
Auto Trait Implementations§
impl Freeze for BondTableBuilder
impl RefUnwindSafe for BondTableBuilder
impl Send for BondTableBuilder
impl Sync for BondTableBuilder
impl Unpin for BondTableBuilder
impl UnsafeUnpin for BondTableBuilder
impl UnwindSafe for BondTableBuilder
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