pub struct DagView<'a> { /* private fields */ }Expand description
Borrowed view of a Dag under a GraphOverlay (no adjacency clone).
Implementations§
Source§impl<'a> DagView<'a>
impl<'a> DagView<'a>
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Node count (same as the base DAG).
Sourcepub fn overlay(&self) -> &'a GraphOverlay
pub fn overlay(&self) -> &'a GraphOverlay
Overlay mask.
Sourcepub fn parents_into(&self, id: DenseNodeId, out: &mut Vec<DenseNodeId>)
pub fn parents_into(&self, id: DenseNodeId, out: &mut Vec<DenseNodeId>)
Collect visible parents of id into out (cleared first).
Sourcepub fn children_into(&self, id: DenseNodeId, out: &mut Vec<DenseNodeId>)
pub fn children_into(&self, id: DenseNodeId, out: &mut Vec<DenseNodeId>)
Collect visible children of id into out (cleared first).
Sourcepub fn ancestors_of(
&self,
nodes: &[DenseNodeId],
out: &mut BitSet,
ws: &mut GraphWorkspace,
)
pub fn ancestors_of( &self, nodes: &[DenseNodeId], out: &mut BitSet, ws: &mut GraphWorkspace, )
Ancestors under the overlay (including seeds).
Sourcepub fn descendants_of(
&self,
nodes: &[DenseNodeId],
out: &mut BitSet,
ws: &mut GraphWorkspace,
)
pub fn descendants_of( &self, nodes: &[DenseNodeId], out: &mut BitSet, ws: &mut GraphWorkspace, )
Descendants under the overlay (including seeds).
Sourcepub fn is_d_separated(
&self,
x: DenseNodeId,
y: DenseNodeId,
z: &[DenseNodeId],
ws: &mut DSeparationWorkspace,
) -> Result<bool, GraphError>
pub fn is_d_separated( &self, x: DenseNodeId, y: DenseNodeId, z: &[DenseNodeId], ws: &mut DSeparationWorkspace, ) -> Result<bool, GraphError>
Sourcepub fn d_separation(
&self,
x: DenseNodeId,
y: DenseNodeId,
z: &[DenseNodeId],
ws: &mut DSeparationWorkspace,
) -> Result<SeparationResult, GraphError>
pub fn d_separation( &self, x: DenseNodeId, y: DenseNodeId, z: &[DenseNodeId], ws: &mut DSeparationWorkspace, ) -> Result<SeparationResult, GraphError>
Sourcepub fn materialize(&self) -> Result<Dag, GraphError>
pub fn materialize(&self) -> Result<Dag, GraphError>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for DagView<'a>
impl<'a> RefUnwindSafe for DagView<'a>
impl<'a> Send for DagView<'a>
impl<'a> Sync for DagView<'a>
impl<'a> Unpin for DagView<'a>
impl<'a> UnsafeUnpin for DagView<'a>
impl<'a> UnwindSafe for DagView<'a>
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