Struct traitgraph::implementation::subgraphs::induced_incremental_subgraph::InducedIncrementalSubgraph
source · 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>
§type OptionalNodeIndex = <Graph as GraphBase>::OptionalNodeIndex
type OptionalNodeIndex = <Graph as GraphBase>::OptionalNodeIndex
§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>
§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
§type EdgeIndices<'a> = Filter<<Graph as ImmutableGraphContainer>::EdgeIndices<'a>, Box<dyn Fn(&<Graph as GraphBase>::EdgeIndex) -> bool + 'a, Global>>
where
Self: 'a
type EdgeIndices<'a> = Filter<<Graph as ImmutableGraphContainer>::EdgeIndices<'a>, Box<dyn Fn(&<Graph as GraphBase>::EdgeIndex) -> bool + 'a, Global>> where Self: 'a
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<'_>
§type NodeIndicesCopied = IntoIter<<Graph as GraphBase>::NodeIndex, Global>
type NodeIndicesCopied = IntoIter<<Graph as GraphBase>::NodeIndex, Global>
§type EdgeIndicesCopied = IntoIter<<Graph as GraphBase>::EdgeIndex, Global>
type EdgeIndicesCopied = IntoIter<<Graph as GraphBase>::EdgeIndex, Global>
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> RefUnwindSafe for InducedIncrementalSubgraph<'a, Graph>where Graph: RefUnwindSafe, <Graph as GraphBase>::NodeIndex: RefUnwindSafe,
impl<'a, Graph> Send for InducedIncrementalSubgraph<'a, Graph>where Graph: Sync, <Graph as GraphBase>::NodeIndex: Send,
impl<'a, Graph> Sync for InducedIncrementalSubgraph<'a, Graph>where Graph: Sync, <Graph as GraphBase>::NodeIndex: Sync,
impl<'a, Graph> Unpin for InducedIncrementalSubgraph<'a, Graph>where <Graph as GraphBase>::NodeIndex: Unpin,
impl<'a, Graph> UnwindSafe for InducedIncrementalSubgraph<'a, Graph>where Graph: RefUnwindSafe, <Graph as GraphBase>::NodeIndex: UnwindSafe,
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§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.§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.§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.§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.§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.§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.§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.§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.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where &'a Self: for<'a> IntoIterator,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere Self: Sized,
§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 more§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 more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere Self: Borrow<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> Rwhere Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere Self: AsMut<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_mut()
into the pipe
function.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,
Deref::Target
of a value. Read more§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.§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.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds.