pub struct GraphOverlay { /* private fields */ }Expand description
Compact edge-visibility mask for graph surgery without cloning adjacency.
A directed edge from → to is visible iff
!hide_outgoing(from) && !hide_incoming(to).
Implementations§
Source§impl GraphOverlay
impl GraphOverlay
Sourcepub fn observational(n: usize) -> Self
pub fn observational(n: usize) -> Self
Observational overlay (all edges visible) for n nodes.
Sourcepub fn do_intervention(n: usize, intervened: &[DenseNodeId]) -> Self
pub fn do_intervention(n: usize, intervened: &[DenseNodeId]) -> Self
Do-intervention overlay: hide all edges into each intervened node.
Sourcepub fn remove_outgoing(n: usize, nodes: &[DenseNodeId]) -> Self
pub fn remove_outgoing(n: usize, nodes: &[DenseNodeId]) -> Self
Hide all outgoing edges from each node (backdoor / IV mutilation style).
Sourcepub fn is_observational(&self) -> bool
pub fn is_observational(&self) -> bool
Whether every directed edge of the base graph remains visible.
Sourcepub fn edge_visible(&self, from: DenseNodeId, to: DenseNodeId) -> bool
pub fn edge_visible(&self, from: DenseNodeId, to: DenseNodeId) -> bool
Whether directed edge from → to is visible under this overlay.
Trait Implementations§
Source§impl Clone for GraphOverlay
impl Clone for GraphOverlay
Source§fn clone(&self) -> GraphOverlay
fn clone(&self) -> GraphOverlay
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GraphOverlay
impl RefUnwindSafe for GraphOverlay
impl Send for GraphOverlay
impl Sync for GraphOverlay
impl Unpin for GraphOverlay
impl UnsafeUnpin for GraphOverlay
impl UnwindSafe for GraphOverlay
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