Struct petgraph::visit::EdgeFiltered
source · [−]pub struct EdgeFiltered<G, F>(pub G, pub F);
Expand description
An edge-filtering graph adaptor.
The adaptor may filter out edges. The filter implements the trait
FilterEdge
. Closures of type Fn(G::EdgeRef) -> bool
already
implement this trait.
The filter may use edge source, target, id, and weight to select whether to include the edge or not.
Tuple Fields
0: G
1: F
Implementations
sourceimpl<F, G> EdgeFiltered<G, F>where
G: IntoEdgeReferences,
F: Fn(G::EdgeRef) -> bool,
impl<F, G> EdgeFiltered<G, F>where
G: IntoEdgeReferences,
F: Fn(G::EdgeRef) -> bool,
Trait Implementations
sourceimpl<G: Clone, F: Clone> Clone for EdgeFiltered<G, F>
impl<G: Clone, F: Clone> Clone for EdgeFiltered<G, F>
sourcefn clone(&self) -> EdgeFiltered<G, F>
fn clone(&self) -> EdgeFiltered<G, F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<G, F> Data for EdgeFiltered<G, F>where
G: Data,
impl<G, F> Data for EdgeFiltered<G, F>where
G: Data,
type NodeWeight = <G as Data>::NodeWeight
type EdgeWeight = <G as Data>::EdgeWeight
sourceimpl<G: Debug, F: Debug> Debug for EdgeFiltered<G, F>
impl<G: Debug, F: Debug> Debug for EdgeFiltered<G, F>
sourceimpl<G, F> EdgeIndexable for EdgeFiltered<G, F>where
G: EdgeIndexable,
impl<G, F> EdgeIndexable for EdgeFiltered<G, F>where
G: EdgeIndexable,
sourcefn edge_bound(&self) -> usize
fn edge_bound(&self) -> usize
Return an upper bound of the edge indices in the graph
(suitable for the size of a bitmap). Read more
sourcefn from_index(&self, i: usize) -> Self::EdgeId
fn from_index(&self, i: usize) -> Self::EdgeId
Convert
i
to an edge index. i
must be a valid value in the graph.sourceimpl<G, F> GraphBase for EdgeFiltered<G, F>where
G: GraphBase,
impl<G, F> GraphBase for EdgeFiltered<G, F>where
G: GraphBase,
sourceimpl<G, F> GraphProp for EdgeFiltered<G, F>where
G: GraphProp,
impl<G, F> GraphProp for EdgeFiltered<G, F>where
G: GraphProp,
sourceimpl<'a, G, F> IntoEdgeReferences for &'a EdgeFiltered<G, F>where
G: IntoEdgeReferences,
F: FilterEdge<G::EdgeRef>,
impl<'a, G, F> IntoEdgeReferences for &'a EdgeFiltered<G, F>where
G: IntoEdgeReferences,
F: FilterEdge<G::EdgeRef>,
type EdgeRef = <G as IntoEdgeReferences>::EdgeRef
type EdgeReferences = EdgeFilteredEdges<'a, G, <G as IntoEdgeReferences>::EdgeReferences, F>
fn edge_references(self) -> Self::EdgeReferences
sourceimpl<'a, G, F> IntoEdges for &'a EdgeFiltered<G, F>where
G: IntoEdges,
F: FilterEdge<G::EdgeRef>,
impl<'a, G, F> IntoEdges for &'a EdgeFiltered<G, F>where
G: IntoEdges,
F: FilterEdge<G::EdgeRef>,
sourceimpl<'a, G, F> IntoEdgesDirected for &'a EdgeFiltered<G, F>where
G: IntoEdgesDirected,
F: FilterEdge<G::EdgeRef>,
impl<'a, G, F> IntoEdgesDirected for &'a EdgeFiltered<G, F>where
G: IntoEdgesDirected,
F: FilterEdge<G::EdgeRef>,
type EdgesDirected = EdgeFilteredEdges<'a, G, <G as IntoEdgesDirected>::EdgesDirected, F>
fn edges_directed(self, n: G::NodeId, dir: Direction) -> Self::EdgesDirected
sourceimpl<'a, G, F> IntoNeighbors for &'a EdgeFiltered<G, F>where
G: IntoEdges,
F: FilterEdge<G::EdgeRef>,
impl<'a, G, F> IntoNeighbors for &'a EdgeFiltered<G, F>where
G: IntoEdges,
F: FilterEdge<G::EdgeRef>,
sourceimpl<'a, G, F> IntoNeighborsDirected for &'a EdgeFiltered<G, F>where
G: IntoEdgesDirected,
F: FilterEdge<G::EdgeRef>,
impl<'a, G, F> IntoNeighborsDirected for &'a EdgeFiltered<G, F>where
G: IntoEdgesDirected,
F: FilterEdge<G::EdgeRef>,
type NeighborsDirected = EdgeFilteredNeighborsDirected<'a, G, F>
fn neighbors_directed(
self,
n: G::NodeId,
dir: Direction
) -> Self::NeighborsDirected
sourceimpl<'a, G, F> IntoNodeIdentifiers for &'a EdgeFiltered<G, F>where
G: IntoNodeIdentifiers,
impl<'a, G, F> IntoNodeIdentifiers for &'a EdgeFiltered<G, F>where
G: IntoNodeIdentifiers,
type NodeIdentifiers = <G as IntoNodeIdentifiers>::NodeIdentifiers
fn node_identifiers(self) -> Self::NodeIdentifiers
sourceimpl<'a, G, F> IntoNodeReferences for &'a EdgeFiltered<G, F>where
G: IntoNodeReferences,
impl<'a, G, F> IntoNodeReferences for &'a EdgeFiltered<G, F>where
G: IntoNodeReferences,
type NodeRef = <G as IntoNodeReferences>::NodeRef
type NodeReferences = <G as IntoNodeReferences>::NodeReferences
fn node_references(self) -> Self::NodeReferences
sourceimpl<G, F> NodeCount for EdgeFiltered<G, F>where
G: NodeCount,
impl<G, F> NodeCount for EdgeFiltered<G, F>where
G: NodeCount,
fn node_count(&self) -> usize
sourceimpl<G, F> NodeIndexable for EdgeFiltered<G, F>where
G: NodeIndexable,
impl<G, F> NodeIndexable for EdgeFiltered<G, F>where
G: NodeIndexable,
sourcefn node_bound(&self) -> usize
fn node_bound(&self) -> usize
Return an upper bound of the node indices in the graph
(suitable for the size of a bitmap). Read more
sourcefn from_index(&self, i: usize) -> Self::NodeId
fn from_index(&self, i: usize) -> Self::NodeId
Convert
i
to a node index. i
must be a valid value in the graph.sourceimpl<G, F> Visitable for EdgeFiltered<G, F>where
G: Visitable,
impl<G, F> Visitable for EdgeFiltered<G, F>where
G: Visitable,
impl<G: Copy, F: Copy> Copy for EdgeFiltered<G, F>
impl<G, F> NodeCompactIndexable for EdgeFiltered<G, F>where
G: NodeCompactIndexable,
Auto Trait Implementations
impl<G, F> RefUnwindSafe for EdgeFiltered<G, F>where
F: RefUnwindSafe,
G: RefUnwindSafe,
impl<G, F> Send for EdgeFiltered<G, F>where
F: Send,
G: Send,
impl<G, F> Sync for EdgeFiltered<G, F>where
F: Sync,
G: Sync,
impl<G, F> Unpin for EdgeFiltered<G, F>where
F: Unpin,
G: Unpin,
impl<G, F> UnwindSafe for EdgeFiltered<G, F>where
F: UnwindSafe,
G: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more