[−][src]Struct libquilt::Graggle
A graggle is like a file, except that its lines are not necessarily in a linear order (rather, they form a directed graph).
This is a read-only view into a graggle. It implements Graph
, so you may
apply graph-based algorithms on it.
Note that lines in a graggle may be either live or deleted (nodes that are ``deleted'' are not
actually removed, but they are simply marked as being deleted). Some of the methods on Graggle
ignore the deleted lines, while others expose them.
Methods
impl<'a> Graggle<'a>
[src]
pub fn nodes(
self
) -> impl Iterator<Item = NodeId> + 'a
[src]
self
) -> impl Iterator<Item = NodeId> + 'a
Returns an iterator over all live nodes of this graggle.
pub fn out_edges(
self,
node: &NodeId
) -> impl Iterator<Item = &'a Edge> + 'a
[src]
self,
node: &NodeId
) -> impl Iterator<Item = &'a Edge> + 'a
Returns an iterator over all edges pointing from node
to another live node.
pub fn out_neighbors(
self,
node: &NodeId
) -> impl Iterator<Item = &'a NodeId> + 'a
[src]
self,
node: &NodeId
) -> impl Iterator<Item = &'a NodeId> + 'a
Returns an iterator over all live out-neighbors of node
.
pub fn in_neighbors(
self,
node: &NodeId
) -> impl Iterator<Item = &'a NodeId> + 'a
[src]
self,
node: &NodeId
) -> impl Iterator<Item = &'a NodeId> + 'a
Returns an iterator over all live in-neighbors of node
.
pub fn all_out_edges(
self,
node: &NodeId
) -> impl Iterator<Item = &'a Edge> + 'a
[src]
self,
node: &NodeId
) -> impl Iterator<Item = &'a Edge> + 'a
Returns an iterator over all edges pointing out of node
, including those that point to
deleted edges.
pub fn in_edges(
self,
node: &NodeId
) -> impl Iterator<Item = &'a Edge> + 'a
[src]
self,
node: &NodeId
) -> impl Iterator<Item = &'a Edge> + 'a
Returns an iterator over all backwards edges pointing from node
to another live node.
pub fn all_in_edges(
self,
node: &NodeId
) -> impl Iterator<Item = &'a Edge> + 'a
[src]
self,
node: &NodeId
) -> impl Iterator<Item = &'a Edge> + 'a
Returns an iterator over all backwards edges pointing out of node
, including those that
point to deleted edges.
pub fn has_node(self, node: &NodeId) -> bool
[src]
Returns true
if node
belongs to this graggle (whether it is live or deleted).
pub fn is_live(self, node: &NodeId) -> bool
[src]
pub fn as_live_graph(self) -> LiveGraph<'a>
[src]
Wraps self
in LiveGraph
, which implements [graph::Graph
] over the live nodes of
this graggle.
pub fn as_full_graph(self) -> FullGraph<'a>
[src]
Wraps self
in FullGraph
, which implements [graph::Graph
] over all (live and
deleted) nodes of this graggle.
Trait Implementations
impl<'a> Clone for Graggle<'a>
[src]
fn clone(&self) -> Graggle<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Copy for Graggle<'a>
[src]
impl<'a> Debug for Graggle<'a>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<N> Edge for N where
N: Copy,
[src]
N: Copy,
impl<T> Same for T
type Output = T
Should always be Self