pub struct InducedIncrementalSubgraph<'a, Graph: GraphBase> { /* private fields */ }
Expand description
A subgraph that stores the presence or absence of a node using integers. Additionally, this subgraph has a current step that can be altered. Nodes are added with that step, and only nodes with a step lower or equal to the current one are counted as present. This allows to combine multiple subgraphs into one, if they are totally ordered by the subset relation.
In this variant of the incremental subgraph, edges are part of a subgraph if their endpoints are part of the subgraph.
Implementations§
Source§impl<'a, Graph: ImmutableGraphContainer> InducedIncrementalSubgraph<'a, Graph>
impl<'a, Graph: ImmutableGraphContainer> InducedIncrementalSubgraph<'a, Graph>
Sourcepub fn new_with_incremental_steps(
graph: &'a Graph,
incremental_steps: usize,
) -> Self
pub fn new_with_incremental_steps( graph: &'a Graph, incremental_steps: usize, ) -> Self
Create an incremental subgraph with the given amount of incremental steps.
Sourcepub fn set_current_step(&mut self, current_step: usize)
pub fn set_current_step(&mut self, current_step: usize)
Set the current incremental step of the graph.
Sourcepub fn new_nodes(&self) -> &Vec<Graph::NodeIndex>
pub fn new_nodes(&self) -> &Vec<Graph::NodeIndex>
Return the nodes that are added in the current incremental step.
Sourcepub fn is_new_node(&self, node_index: <Self as GraphBase>::NodeIndex) -> bool
pub fn is_new_node(&self, node_index: <Self as GraphBase>::NodeIndex) -> bool
Returns true if this node was added in the current step.
Sourcepub fn is_newly_removed_node(
&self,
node_index: <Self as GraphBase>::NodeIndex,
) -> bool
pub fn is_newly_removed_node( &self, node_index: <Self as GraphBase>::NodeIndex, ) -> bool
Returns true if this node was removed in the current reverse step.
Trait Implementations§
Source§impl<Graph: GraphBase> GraphBase for InducedIncrementalSubgraph<'_, Graph>
impl<Graph: GraphBase> GraphBase for InducedIncrementalSubgraph<'_, Graph>
Source§type OptionalNodeIndex = <Graph as GraphBase>::OptionalNodeIndex
type OptionalNodeIndex = <Graph as GraphBase>::OptionalNodeIndex
Source§type OptionalEdgeIndex = <Graph as GraphBase>::OptionalEdgeIndex
type OptionalEdgeIndex = <Graph as GraphBase>::OptionalEdgeIndex
Source§fn new_none_optional_node_index(&self) -> Self::OptionalNodeIndex
fn new_none_optional_node_index(&self) -> Self::OptionalNodeIndex
Source§fn new_none_optional_edge_index(&self) -> Self::OptionalEdgeIndex
fn new_none_optional_edge_index(&self) -> Self::OptionalEdgeIndex
Source§impl<Graph: ImmutableGraphContainer> ImmutableGraphContainer for InducedIncrementalSubgraph<'_, Graph>
impl<Graph: ImmutableGraphContainer> ImmutableGraphContainer for InducedIncrementalSubgraph<'_, Graph>
Source§type NodeIndices<'a> = FilterNodeIndexIterator<'a, <InducedIncrementalSubgraph<'_, Graph> as GraphBase>::NodeIndex, <InducedIncrementalSubgraph<'_, Graph> as GraphBase>::OptionalNodeIndex, <Graph as ImmutableGraphContainer>::NodeIndices<'a>, InducedIncrementalSubgraph<'_, Graph>>
where
Self: 'a
type NodeIndices<'a> = FilterNodeIndexIterator<'a, <InducedIncrementalSubgraph<'_, Graph> as GraphBase>::NodeIndex, <InducedIncrementalSubgraph<'_, Graph> as GraphBase>::OptionalNodeIndex, <Graph as ImmutableGraphContainer>::NodeIndices<'a>, InducedIncrementalSubgraph<'_, Graph>> where Self: 'a
Source§type EdgeIndices<'a> = Filter<<Graph as ImmutableGraphContainer>::EdgeIndices<'a>, Box<dyn Fn(&<Graph as GraphBase>::EdgeIndex) -> bool + 'a>>
where
Self: 'a
type EdgeIndices<'a> = Filter<<Graph as ImmutableGraphContainer>::EdgeIndices<'a>, Box<dyn Fn(&<Graph as GraphBase>::EdgeIndex) -> bool + 'a>> where Self: 'a
Source§type NodeIndicesCopied = IntoIter<<Graph as GraphBase>::NodeIndex>
type NodeIndicesCopied = IntoIter<<Graph as GraphBase>::NodeIndex>
Source§type EdgeIndicesCopied = IntoIter<<Graph as GraphBase>::EdgeIndex>
type EdgeIndicesCopied = IntoIter<<Graph as GraphBase>::EdgeIndex>
Source§fn node_indices(&self) -> Self::NodeIndices<'_>
fn node_indices(&self) -> Self::NodeIndices<'_>
Source§fn edge_indices(&self) -> Self::EdgeIndices<'_>
fn edge_indices(&self) -> Self::EdgeIndices<'_>
Source§fn node_indices_copied(&self) -> Self::NodeIndicesCopied
fn node_indices_copied(&self) -> Self::NodeIndicesCopied
Source§fn edge_indices_copied(&self) -> Self::EdgeIndicesCopied
fn edge_indices_copied(&self) -> Self::EdgeIndicesCopied
Source§fn contains_node_index(&self, node_id: Self::NodeIndex) -> bool
fn contains_node_index(&self, node_id: Self::NodeIndex) -> bool
Source§fn contains_edge_index(&self, edge_id: Self::EdgeIndex) -> bool
fn contains_edge_index(&self, edge_id: Self::EdgeIndex) -> bool
Source§fn node_count(&self) -> usize
fn node_count(&self) -> usize
Source§fn edge_count(&self) -> usize
fn edge_count(&self) -> usize
Source§fn node_data(&self, node_id: Self::NodeIndex) -> &Self::NodeData
fn node_data(&self, node_id: Self::NodeIndex) -> &Self::NodeData
Source§fn edge_data(&self, edge_id: Self::EdgeIndex) -> &Self::EdgeData
fn edge_data(&self, edge_id: Self::EdgeIndex) -> &Self::EdgeData
Source§fn edge_endpoints(&self, edge_id: Self::EdgeIndex) -> Edge<Self::NodeIndex>
fn edge_endpoints(&self, edge_id: Self::EdgeIndex) -> Edge<Self::NodeIndex>
Source§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Source§fn do_all_edges_endpoints_exist(&self) -> bool
fn do_all_edges_endpoints_exist(&self) -> bool
edge_endpoints
are part of the graph for all edges.Source§impl<Graph: SubgraphBase> SubgraphBase for InducedIncrementalSubgraph<'_, Graph>
impl<Graph: SubgraphBase> SubgraphBase for InducedIncrementalSubgraph<'_, Graph>
Auto Trait Implementations§
impl<'a, Graph> Freeze for InducedIncrementalSubgraph<'a, Graph>
impl<'a, Graph> RefUnwindSafe for InducedIncrementalSubgraph<'a, Graph>
impl<'a, Graph> Send for InducedIncrementalSubgraph<'a, Graph>
impl<'a, Graph> Sync for InducedIncrementalSubgraph<'a, Graph>
impl<'a, Graph> Unpin for InducedIncrementalSubgraph<'a, Graph>
impl<'a, Graph> UnwindSafe for InducedIncrementalSubgraph<'a, Graph>
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
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.