Struct petgraph::visit::EdgeFiltered
[−]
[src]
pub struct EdgeFiltered<G, F>(pub G, pub F);
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.
Methods
impl<F, G> EdgeFiltered<G, F> where G: IntoEdgeReferences, F: Fn(G::EdgeRef) -> bool
[src]
fn from_fn(graph: G, filter: F) -> Self
Create an EdgeFiltered
adaptor from the closure filter
.
Trait Implementations
impl<G: Copy, F: Copy> Copy for EdgeFiltered<G, F>
[src]
impl<G: Clone, F: Clone> Clone for EdgeFiltered<G, F>
[src]
fn clone(&self) -> EdgeFiltered<G, F>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<G: Debug, F: Debug> Debug for EdgeFiltered<G, F>
[src]
impl<G, F> GraphBase for EdgeFiltered<G, F> where G: GraphBase
[src]
impl<'a, G, F> IntoNeighbors for &'a EdgeFiltered<G, F> where G: IntoEdges, F: FilterEdge<G::EdgeRef>
[src]
type Neighbors = EdgeFilteredNeighbors<'a, G, F>
fn neighbors(self, n: G::NodeId) -> Self::Neighbors
Return an iterator of the neighbors of node a
.
impl<'a, G, F> IntoEdgeReferences for &'a EdgeFiltered<G, F> where G: IntoEdgeReferences, F: FilterEdge<G::EdgeRef>
[src]
type EdgeRef = G::EdgeRef
type EdgeReferences = EdgeFilteredEdges<'a, G, G::EdgeReferences, F>
fn edge_references(self) -> Self::EdgeReferences
impl<'a, G, F> IntoEdges for &'a EdgeFiltered<G, F> where G: IntoEdges, F: FilterEdge<G::EdgeRef>
[src]
type Edges = EdgeFilteredEdges<'a, G, G::Edges, F>
fn edges(self, n: G::NodeId) -> Self::Edges
impl<G, F> Data for EdgeFiltered<G, F> where G: Data
[src]
type NodeWeight = G::NodeWeight
type EdgeWeight = G::EdgeWeight
impl<G, F> GraphProp for EdgeFiltered<G, F> where G: GraphProp
[src]
impl<'a, G, F> IntoNodeIdentifiers for &'a EdgeFiltered<G, F> where G: IntoNodeIdentifiers
[src]
type NodeIdentifiers = G::NodeIdentifiers
fn node_identifiers(self) -> Self::NodeIdentifiers
impl<'a, G, F> IntoNodeReferences for &'a EdgeFiltered<G, F> where G: IntoNodeReferences
[src]
type NodeRef = G::NodeRef
type NodeReferences = G::NodeReferences
fn node_references(self) -> Self::NodeReferences
impl<G, F> NodeCompactIndexable for EdgeFiltered<G, F> where G: NodeCompactIndexable
[src]
impl<G, F> NodeCount for EdgeFiltered<G, F> where G: NodeCount
[src]
fn node_count(&self) -> usize
impl<G, F> NodeIndexable for EdgeFiltered<G, F> where G: NodeIndexable
[src]
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
fn to_index(&self, a: Self::NodeId) -> usize
Convert a
to an integer index.
fn from_index(&self, i: usize) -> Self::NodeId
Convert i
to a node index