pub struct SubgraphRegistry { /* private fields */ }Expand description
Union-find registry tracking each node’s connected-component
membership. Wrapped by crate::Core in Arc<Mutex<...>> so
the wave engine can resolve a node’s partition before acquiring
that partition’s wave_owner.
Implementations§
Source§impl SubgraphRegistry
impl SubgraphRegistry
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Number of registered nodes. Useful for debugging + acceptance
tests that verify the registry stays in sync with Core::nodes.
Sourcepub fn component_count(&self) -> usize
pub fn component_count(&self) -> usize
Number of distinct connected components. Two threads emitting into nodes with distinct partitions can run truly parallel (Y1+); X5 substrate does not yet exercise that property.
Sourcepub fn partition_of(&mut self, node: NodeId) -> Option<SubgraphId>
pub fn partition_of(&mut self, node: NodeId) -> Option<SubgraphId>
Resolve node’s partition. Returns None for unregistered
nodes. Mutating because path compression may relink under
find.
Auto Trait Implementations§
impl Freeze for SubgraphRegistry
impl !RefUnwindSafe for SubgraphRegistry
impl Send for SubgraphRegistry
impl Sync for SubgraphRegistry
impl Unpin for SubgraphRegistry
impl UnsafeUnpin for SubgraphRegistry
impl !UnwindSafe for SubgraphRegistry
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