pub struct UnionSubgraph<'a, Graph0, Graph1>(/* private fields */);Expand description
A subgraph built from the union of two graphs.
Implementations§
Source§impl<'a, Graph0, Graph1> UnionSubgraph<'a, Graph0, Graph1>
impl<'a, Graph0, Graph1> UnionSubgraph<'a, Graph0, Graph1>
Sourcepub fn new(graph0: &'a Graph0, graph1: &'a Graph1) -> Self
pub fn new(graph0: &'a Graph0, graph1: &'a Graph1) -> Self
Construct a new subgraph from the union of the two given graphs.
Trait Implementations§
Source§impl<Graph0: GraphBase, Graph1: GraphBase> GraphBase for UnionSubgraph<'_, Graph0, Graph1>
impl<Graph0: GraphBase, Graph1: GraphBase> GraphBase for UnionSubgraph<'_, Graph0, Graph1>
Source§type OptionalNodeIndex = <Graph0 as GraphBase>::OptionalNodeIndex
type OptionalNodeIndex = <Graph0 as GraphBase>::OptionalNodeIndex
The optional index type used for nodes.
Source§type OptionalEdgeIndex = <Graph0 as GraphBase>::OptionalEdgeIndex
type OptionalEdgeIndex = <Graph0 as GraphBase>::OptionalEdgeIndex
The optional index type used for edges.
Source§fn new_none_optional_node_index(&self) -> Self::OptionalNodeIndex
fn new_none_optional_node_index(&self) -> Self::OptionalNodeIndex
Returns the none value of the optional node index type used by the trait.
Source§fn new_none_optional_edge_index(&self) -> Self::OptionalEdgeIndex
fn new_none_optional_edge_index(&self) -> Self::OptionalEdgeIndex
Returns the none value of the optional edge index type used by the trait.
Source§impl<NodeIndex: GraphIndex<OptionalNodeIndex>, OptionalNodeIndex: OptionalGraphIndex<NodeIndex>, EdgeIndex: GraphIndex<OptionalEdgeIndex>, OptionalEdgeIndex: OptionalGraphIndex<EdgeIndex>, Graph0: ImmutableGraphContainer + SubgraphBase + GraphBase<NodeIndex = NodeIndex, OptionalNodeIndex = OptionalNodeIndex, EdgeIndex = EdgeIndex, OptionalEdgeIndex = OptionalEdgeIndex>, Graph1: ImmutableGraphContainer + SubgraphBase + GraphBase<NodeIndex = NodeIndex, OptionalNodeIndex = OptionalNodeIndex, EdgeIndex = EdgeIndex, OptionalEdgeIndex = OptionalEdgeIndex>> ImmutableGraphContainer for UnionSubgraph<'_, Graph0, Graph1>
impl<NodeIndex: GraphIndex<OptionalNodeIndex>, OptionalNodeIndex: OptionalGraphIndex<NodeIndex>, EdgeIndex: GraphIndex<OptionalEdgeIndex>, OptionalEdgeIndex: OptionalGraphIndex<EdgeIndex>, Graph0: ImmutableGraphContainer + SubgraphBase + GraphBase<NodeIndex = NodeIndex, OptionalNodeIndex = OptionalNodeIndex, EdgeIndex = EdgeIndex, OptionalEdgeIndex = OptionalEdgeIndex>, Graph1: ImmutableGraphContainer + SubgraphBase + GraphBase<NodeIndex = NodeIndex, OptionalNodeIndex = OptionalNodeIndex, EdgeIndex = EdgeIndex, OptionalEdgeIndex = OptionalEdgeIndex>> ImmutableGraphContainer for UnionSubgraph<'_, Graph0, Graph1>
Source§type NodeIndices<'a> = UnionIndexIterator<NodeIndex, OptionalNodeIndex, <Graph0 as ImmutableGraphContainer>::NodeIndices<'a>, <Graph1 as ImmutableGraphContainer>::NodeIndices<'a>>
where
Self: 'a
type NodeIndices<'a> = UnionIndexIterator<NodeIndex, OptionalNodeIndex, <Graph0 as ImmutableGraphContainer>::NodeIndices<'a>, <Graph1 as ImmutableGraphContainer>::NodeIndices<'a>> where Self: 'a
An iterator type over the node indices in this graph.
Source§type EdgeIndices<'a> = UnionIndexIterator<EdgeIndex, OptionalEdgeIndex, <Graph0 as ImmutableGraphContainer>::EdgeIndices<'a>, <Graph1 as ImmutableGraphContainer>::EdgeIndices<'a>>
where
Self: 'a
type EdgeIndices<'a> = UnionIndexIterator<EdgeIndex, OptionalEdgeIndex, <Graph0 as ImmutableGraphContainer>::EdgeIndices<'a>, <Graph1 as ImmutableGraphContainer>::EdgeIndices<'a>> where Self: 'a
An iterator type over the edge indices in this graph.
Source§type NodeIndicesCopied = UnionIndexIterator<NodeIndex, OptionalNodeIndex, <Graph0 as ImmutableGraphContainer>::NodeIndicesCopied, <Graph1 as ImmutableGraphContainer>::NodeIndicesCopied>
type NodeIndicesCopied = UnionIndexIterator<NodeIndex, OptionalNodeIndex, <Graph0 as ImmutableGraphContainer>::NodeIndicesCopied, <Graph1 as ImmutableGraphContainer>::NodeIndicesCopied>
An iterator type over the node indices in this graph.
The iterator is independent of the lifetime of self, and hence allows concurrent modifications during iteration.
Note that any modification to the graph is not reflected in the iterator after construction.
Source§type EdgeIndicesCopied = UnionIndexIterator<EdgeIndex, OptionalEdgeIndex, <Graph0 as ImmutableGraphContainer>::EdgeIndicesCopied, <Graph1 as ImmutableGraphContainer>::EdgeIndicesCopied>
type EdgeIndicesCopied = UnionIndexIterator<EdgeIndex, OptionalEdgeIndex, <Graph0 as ImmutableGraphContainer>::EdgeIndicesCopied, <Graph1 as ImmutableGraphContainer>::EdgeIndicesCopied>
An iterator type over the edge indices in this graph.
The iterator is independent of the lifetime of self, and hence allows concurrent modifications during iteration.
Note that any modification to the graph is not reflected in the iterator after construction.
Source§fn node_indices(&self) -> Self::NodeIndices<'_>
fn node_indices(&self) -> Self::NodeIndices<'_>
Returns an iterator over the node indices in this graph.
Source§fn edge_indices(&self) -> Self::EdgeIndices<'_>
fn edge_indices(&self) -> Self::EdgeIndices<'_>
Returns an iterator over the edge indices in this graph.
Source§fn node_indices_copied(&self) -> Self::NodeIndicesCopied
fn node_indices_copied(&self) -> Self::NodeIndicesCopied
Returns an iterator over the node indices in this graph.
The iterator is independent of the lifetime of self, and hence allows concurrent modifications during iteration.
Note that any modification to the graph is not reflected in the iterator after construction.
Source§fn edge_indices_copied(&self) -> Self::EdgeIndicesCopied
fn edge_indices_copied(&self) -> Self::EdgeIndicesCopied
Returns an iterator over the edge indices in this graph.
The iterator is independent of the lifetime of self, and hence allows concurrent modifications during iteration.
Note that any modification to the graph is not reflected in the iterator after construction.
Source§fn contains_node_index(&self, node_id: Self::NodeIndex) -> bool
fn contains_node_index(&self, node_id: Self::NodeIndex) -> bool
Returns true if this graph contains the given node index.
Source§fn contains_edge_index(&self, edge_id: Self::EdgeIndex) -> bool
fn contains_edge_index(&self, edge_id: Self::EdgeIndex) -> bool
Returns true if this graph contains the given edge index.
Source§fn node_count(&self) -> usize
fn node_count(&self) -> usize
Returns the amount of nodes in this graph.
Source§fn edge_count(&self) -> usize
fn edge_count(&self) -> usize
Returns the amount of edges in this graph.
Source§fn node_data(&self, node_id: Self::NodeIndex) -> &Self::NodeData
fn node_data(&self, node_id: Self::NodeIndex) -> &Self::NodeData
Returns a reference to the node data associated with the given node id, or None if there is no such node.
Source§fn edge_data(&self, edge_id: Self::EdgeIndex) -> &Self::EdgeData
fn edge_data(&self, edge_id: Self::EdgeIndex) -> &Self::EdgeData
Returns a reference to the edge data associated with the given edge id, or None if there is no such edge.
Source§fn edge_endpoints(&self, edge_id: Self::EdgeIndex) -> Edge<Self::NodeIndex>
fn edge_endpoints(&self, edge_id: Self::EdgeIndex) -> Edge<Self::NodeIndex>
Returns the endpoints of an edge.
Source§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Returns true if the graph is empty, i.e. contains no nodes or edges.
Source§fn do_all_edges_endpoints_exist(&self) -> bool
fn do_all_edges_endpoints_exist(&self) -> bool
Returns true if the nodes returned by
edge_endpoints are part of the graph for all edges.Source§impl<Graph0: SubgraphBase, Graph1: SubgraphBase> SubgraphBase for UnionSubgraph<'_, Graph0, Graph1>
impl<Graph0: SubgraphBase, Graph1: SubgraphBase> SubgraphBase for UnionSubgraph<'_, Graph0, Graph1>
Auto Trait Implementations§
impl<'a, Graph0, Graph1> Freeze for UnionSubgraph<'a, Graph0, Graph1>
impl<'a, Graph0, Graph1> RefUnwindSafe for UnionSubgraph<'a, Graph0, Graph1>where
Graph0: RefUnwindSafe,
Graph1: RefUnwindSafe,
impl<'a, Graph0, Graph1> Send for UnionSubgraph<'a, Graph0, Graph1>
impl<'a, Graph0, Graph1> Sync for UnionSubgraph<'a, Graph0, Graph1>
impl<'a, Graph0, Graph1> Unpin for UnionSubgraph<'a, Graph0, Graph1>
impl<'a, Graph0, Graph1> UnwindSafe for UnionSubgraph<'a, Graph0, Graph1>where
Graph0: RefUnwindSafe,
Graph1: RefUnwindSafe,
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> 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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Pipes by value. This is generally the method you want to use. Read more
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,
Borrows
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,
Mutably borrows
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
Borrows
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
Mutably borrows
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
Borrows
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
Immutable access to the
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
Mutable access to the
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
Immutable access to the
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
Mutable access to the
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
Immutable access to the
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
Mutable access to the
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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<Graph> WalkableGraph for Graphwhere
Graph: GraphBase,
impl<Graph> WalkableGraph for Graphwhere
Graph: GraphBase,
Source§fn create_node_walk<WalkType: NodeWalk<Self, SubwalkType> + FromIterator<Self::NodeIndex>, SubwalkType: NodeWalk<Self, SubwalkType> + ?Sized>(
&self,
walk: &[Self::NodeIndex],
) -> WalkType
fn create_node_walk<WalkType: NodeWalk<Self, SubwalkType> + FromIterator<Self::NodeIndex>, SubwalkType: NodeWalk<Self, SubwalkType> + ?Sized>( &self, walk: &[Self::NodeIndex], ) -> WalkType
Create a node-centric walk over the given nodes in this graph.
Source§fn create_empty_node_walk<WalkType: NodeWalk<Self, SubwalkType> + Default, SubwalkType: NodeWalk<Self, SubwalkType> + ?Sized>(
&self,
) -> WalkType
fn create_empty_node_walk<WalkType: NodeWalk<Self, SubwalkType> + Default, SubwalkType: NodeWalk<Self, SubwalkType> + ?Sized>( &self, ) -> WalkType
Create an empty node-centric walk in this graph.
Source§fn create_edge_walk<WalkType: EdgeWalk<Self, SubwalkType> + FromIterator<Self::EdgeIndex>, SubwalkType: EdgeWalk<Self, SubwalkType> + ?Sized>(
&self,
walk: &[Self::EdgeIndex],
) -> WalkType
fn create_edge_walk<WalkType: EdgeWalk<Self, SubwalkType> + FromIterator<Self::EdgeIndex>, SubwalkType: EdgeWalk<Self, SubwalkType> + ?Sized>( &self, walk: &[Self::EdgeIndex], ) -> WalkType
Create an edge-centric walk over the given edges in this graph.