pub struct GraphValidator;Expand description
Validates a filter graph for structural correctness.
Implementations§
Source§impl GraphValidator
impl GraphValidator
Sourcepub fn has_cycle(graph: &SimpleGraph) -> bool
pub fn has_cycle(graph: &SimpleGraph) -> bool
Return true if the graph has at least one cycle.
Uses DFS with gray/black node colouring (identical to
CycleGraph::has_cycle but operating on the SimpleGraph type).
Sourcepub fn is_valid_dag(graph: &SimpleGraph) -> bool
pub fn is_valid_dag(graph: &SimpleGraph) -> bool
Return true if the graph is a valid DAG (no cycles, at least one node).
Sourcepub fn source_nodes(graph: &SimpleGraph) -> Vec<NodeId>
pub fn source_nodes(graph: &SimpleGraph) -> Vec<NodeId>
Collect all nodes with in-degree 0 (potential source nodes).
Sourcepub fn sink_nodes(graph: &SimpleGraph) -> Vec<NodeId>
pub fn sink_nodes(graph: &SimpleGraph) -> Vec<NodeId>
Collect all nodes with out-degree 0 (potential sink nodes).
Auto Trait Implementations§
impl Freeze for GraphValidator
impl RefUnwindSafe for GraphValidator
impl Send for GraphValidator
impl Sync for GraphValidator
impl Unpin for GraphValidator
impl UnsafeUnpin for GraphValidator
impl UnwindSafe for GraphValidator
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