Struct traitgraph::implementation::incremental_subgraph::IncrementalSubgraph [−][src]
pub struct IncrementalSubgraph<'a, Graph: GraphBase> { /* fields omitted */ }
Expand description
A subgraph that stores the presence or absence of a node or edge using integers. Additionally, this subgraph has a current step that can be altered. Nodes and edges that are added are added with that step, and only nodes and edges with a step lower or equal to the current one are counted as present. This allows to combined multiple subgraphs into one, if they are totally ordered by the subset relation.
Implementations
pub fn new_with_incremental_steps(
graph: <Self as DecoratingSubgraph>::ParentGraphRef,
incremental_steps: usize
) -> Self
pub fn new_with_incremental_steps(
graph: <Self as DecoratingSubgraph>::ParentGraphRef,
incremental_steps: usize
) -> Self
Create an incremental subgraph with the given amount of incremental steps.
Set the current incremental step of the graph.
Return the nodes that are added in the current incremental step.
Trait Implementations
Not implemented for this type.
Not implemented for this type.
Panics if the node_index is not valid for the graph passed in the constructor. Panics also if the node was added already.
Panics if the edge_index is not valid for the graph passed in the constructor. Panics also if the edge was added already.
Panics if the node_index is not valid for the graph passed in the constructor.
Panics if the edge_index is not valid for the graph passed in the constructor.
Returns the amount of nodes in the subgraph.
Returns the amount of edges in the subgraph.
type ParentGraph = Graph
type ParentGraph = Graph
The type of the associated parent graph.
type ParentGraphRef = &'a Graph
type ParentGraphRef = &'a Graph
The type of the reference to the associated parent graph.
Returns a reference to the original graph.
Returns true if the given node id is part of the subgraph.
Returns true if the given edge id is part of the subgraph.
Auto Trait Implementations
impl<'a, Graph> RefUnwindSafe for IncrementalSubgraph<'a, Graph> where
Graph: RefUnwindSafe,
<Graph as GraphBase>::EdgeIndex: RefUnwindSafe,
<Graph as GraphBase>::NodeIndex: RefUnwindSafe,
impl<'a, Graph> Send for IncrementalSubgraph<'a, Graph> where
Graph: Sync,
<Graph as GraphBase>::EdgeIndex: Send,
<Graph as GraphBase>::NodeIndex: Send,
impl<'a, Graph> Sync for IncrementalSubgraph<'a, Graph> where
Graph: Sync,
<Graph as GraphBase>::EdgeIndex: Sync,
<Graph as GraphBase>::NodeIndex: Sync,
impl<'a, Graph> Unpin for IncrementalSubgraph<'a, Graph> where
<Graph as GraphBase>::EdgeIndex: Unpin,
<Graph as GraphBase>::NodeIndex: Unpin,
impl<'a, Graph> UnwindSafe for IncrementalSubgraph<'a, Graph> where
Graph: RefUnwindSafe,
<Graph as GraphBase>::EdgeIndex: UnwindSafe,
<Graph as GraphBase>::NodeIndex: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
type NodeData = <<T as DecoratingSubgraph>::ParentGraph as GraphBase>::NodeData
type NodeData = <<T as DecoratingSubgraph>::ParentGraph as GraphBase>::NodeData
The data type associated with each node.
type EdgeData = <<T as DecoratingSubgraph>::ParentGraph as GraphBase>::EdgeData
type EdgeData = <<T as DecoratingSubgraph>::ParentGraph as GraphBase>::EdgeData
The data type associated with each edge.
type OptionalNodeIndex = <<T as DecoratingSubgraph>::ParentGraph as GraphBase>::OptionalNodeIndex
type OptionalNodeIndex = <<T as DecoratingSubgraph>::ParentGraph as GraphBase>::OptionalNodeIndex
The optional index type used for nodes.
type OptionalEdgeIndex = <<T as DecoratingSubgraph>::ParentGraph as GraphBase>::OptionalEdgeIndex
type OptionalEdgeIndex = <<T as DecoratingSubgraph>::ParentGraph as GraphBase>::OptionalEdgeIndex
The optional index type used for edges.
type NodeIndex = <<T as DecoratingSubgraph>::ParentGraph as GraphBase>::NodeIndex
type NodeIndex = <<T as DecoratingSubgraph>::ParentGraph as GraphBase>::NodeIndex
The index type used for nodes.
type EdgeIndex = <<T as DecoratingSubgraph>::ParentGraph as GraphBase>::EdgeIndex
type EdgeIndex = <<T as DecoratingSubgraph>::ParentGraph as GraphBase>::EdgeIndex
The index type used for edges.
Returns the none value of the optional node index type used by the trait.
Returns the none value of the optional edge index type used by the trait.
impl<T> ImmutableGraphContainer for T where
T: DecoratingSubgraph,
<T as DecoratingSubgraph>::ParentGraph: ImmutableGraphContainer,
<T as DecoratingSubgraph>::ParentGraph: for<'a> NavigableGraph<'a>,
impl<T> ImmutableGraphContainer for T where
T: DecoratingSubgraph,
<T as DecoratingSubgraph>::ParentGraph: ImmutableGraphContainer,
<T as DecoratingSubgraph>::ParentGraph: for<'a> NavigableGraph<'a>,
pub fn node_indices(
&Self
) -> GraphIndices<<T as GraphBase>::NodeIndex, <T as GraphBase>::OptionalNodeIndex>ⓘNotable traits for GraphIndices<IndexType, OptionalIndexType>impl<OptionalIndexType: OptionalGraphIndex<IndexType>, IndexType: GraphIndex<OptionalIndexType>> Iterator for GraphIndices<IndexType, OptionalIndexType> type Item = IndexType;
pub fn node_indices(
&Self
) -> GraphIndices<<T as GraphBase>::NodeIndex, <T as GraphBase>::OptionalNodeIndex>ⓘNotable traits for GraphIndices<IndexType, OptionalIndexType>impl<OptionalIndexType: OptionalGraphIndex<IndexType>, IndexType: GraphIndex<OptionalIndexType>> Iterator for GraphIndices<IndexType, OptionalIndexType> type Item = IndexType;
impl<OptionalIndexType: OptionalGraphIndex<IndexType>, IndexType: GraphIndex<OptionalIndexType>> Iterator for GraphIndices<IndexType, OptionalIndexType> type Item = IndexType;
Returns an iterator over the node indices in this graph.
pub fn edge_indices(
&Self
) -> GraphIndices<<T as GraphBase>::EdgeIndex, <T as GraphBase>::OptionalEdgeIndex>ⓘNotable traits for GraphIndices<IndexType, OptionalIndexType>impl<OptionalIndexType: OptionalGraphIndex<IndexType>, IndexType: GraphIndex<OptionalIndexType>> Iterator for GraphIndices<IndexType, OptionalIndexType> type Item = IndexType;
pub fn edge_indices(
&Self
) -> GraphIndices<<T as GraphBase>::EdgeIndex, <T as GraphBase>::OptionalEdgeIndex>ⓘNotable traits for GraphIndices<IndexType, OptionalIndexType>impl<OptionalIndexType: OptionalGraphIndex<IndexType>, IndexType: GraphIndex<OptionalIndexType>> Iterator for GraphIndices<IndexType, OptionalIndexType> type Item = IndexType;
impl<OptionalIndexType: OptionalGraphIndex<IndexType>, IndexType: GraphIndex<OptionalIndexType>> Iterator for GraphIndices<IndexType, OptionalIndexType> type Item = IndexType;
Returns an iterator over the edge indices in this graph.
Returns true if this graph contains the given node index.
Returns true if this graph contains the given edge index.
Returns the amount of nodes in this graph.
Returns the amount of edges in this graph.
Returns a reference to the node data associated with the given node id, or None if there is no such node.
Returns a reference to the edge data associated with the given edge id, or None if there is no such edge.
Returns a mutable reference to the node data associated with the given node id, or None if there is no such node.
Returns a mutable reference to the edge data associated with the given edge id, or None if there is no such edge.
Returns true if the graph contains an edge (from, to)
.
Returns the amount of edges (from, to)
.
Returns the endpoints of an edge.
type OutNeighbors = EdgeFilteredNeighborIterator<'a, T, <<T as DecoratingSubgraph>::ParentGraph as NavigableGraph<'a>>::OutNeighbors>
type OutNeighbors = EdgeFilteredNeighborIterator<'a, T, <<T as DecoratingSubgraph>::ParentGraph as NavigableGraph<'a>>::OutNeighbors>
The iterator type used to iterate over the outgoing neighbors of a node.
type InNeighbors = EdgeFilteredNeighborIterator<'a, T, <<T as DecoratingSubgraph>::ParentGraph as NavigableGraph<'a>>::InNeighbors>
type InNeighbors = EdgeFilteredNeighborIterator<'a, T, <<T as DecoratingSubgraph>::ParentGraph as NavigableGraph<'a>>::InNeighbors>
The iterator type used to iterate over the incoming neighbors of a node.
type EdgesBetween = EdgeFilteredEdgeIterator<'a, T, <<T as DecoratingSubgraph>::ParentGraph as NavigableGraph<'a>>::EdgesBetween>
type EdgesBetween = EdgeFilteredEdgeIterator<'a, T, <<T as DecoratingSubgraph>::ParentGraph as NavigableGraph<'a>>::EdgesBetween>
The iterator type used to iterate over the edges between to nodes.
pub fn out_neighbors(
&'a Self,
<T as GraphBase>::NodeIndex
) -> <T as NavigableGraph<'a>>::OutNeighbors
pub fn out_neighbors(
&'a Self,
<T as GraphBase>::NodeIndex
) -> <T as NavigableGraph<'a>>::OutNeighbors
Returns an iterator over the outgoing neighbors of the given node.
pub fn in_neighbors(
&'a Self,
<T as GraphBase>::NodeIndex
) -> <T as NavigableGraph<'a>>::InNeighbors
pub fn in_neighbors(
&'a Self,
<T as GraphBase>::NodeIndex
) -> <T as NavigableGraph<'a>>::InNeighbors
Returns an iterator over the incoming neighbors of the given node.
pub fn edges_between(
&'a Self,
<T as GraphBase>::NodeIndex,
<T as GraphBase>::NodeIndex
) -> <T as NavigableGraph<'a>>::EdgesBetween
pub fn edges_between(
&'a Self,
<T as GraphBase>::NodeIndex,
<T as GraphBase>::NodeIndex
) -> <T as NavigableGraph<'a>>::EdgesBetween
Returns an iterator over the edges (from_node_id, to_node_id)
.
Returns the amount of outgoing edges from a node.
Returns the amount of incoming edges to a node.
Returns true if the given node has indegree == 1 and outdegree == 1.
Returns true if the given node has indegree > 1 and outdegree > 1.
Returns true if the given edge’s tail has outdegree > 1.
Returns true if the given edge’s head has indegree > 1.
Returns true if the given node has outdegree > 1.
Returns true if the given node has indegree > 1.
pub fn vzip(self) -> V
fn create_node_walk<WalkType: for<'a> NodeWalk<'a, Self, SubwalkType> + FromIterator<Self::NodeIndex>, SubwalkType: for<'a> NodeWalk<'a, Self, SubwalkType> + ?Sized>(
&self,
walk: &[Self::NodeIndex]
) -> WalkType
fn create_node_walk<WalkType: for<'a> NodeWalk<'a, Self, SubwalkType> + FromIterator<Self::NodeIndex>, SubwalkType: for<'a> NodeWalk<'a, Self, SubwalkType> + ?Sized>(
&self,
walk: &[Self::NodeIndex]
) -> WalkType
Create a node-centric walk over the given nodes in this graph.
Create an empty node-centric walk in this graph.
fn create_edge_walk<WalkType: for<'a> EdgeWalk<'a, Self, SubwalkType> + FromIterator<Self::EdgeIndex>, SubwalkType: for<'a> EdgeWalk<'a, Self, SubwalkType> + ?Sized>(
&self,
walk: &[Self::EdgeIndex]
) -> WalkType
fn create_edge_walk<WalkType: for<'a> EdgeWalk<'a, Self, SubwalkType> + FromIterator<Self::EdgeIndex>, SubwalkType: for<'a> EdgeWalk<'a, Self, SubwalkType> + ?Sized>(
&self,
walk: &[Self::EdgeIndex]
) -> WalkType
Create an edge-centric walk over the given edges in this graph.