Struct petgraph::visit::NodeFiltered
[−]
[src]
pub struct NodeFiltered<G, F>(pub G, pub F);
A node-filtering graph adaptor.
Methods
impl<F, G> NodeFiltered<G, F> where
G: GraphBase,
F: Fn(G::NodeId) -> bool,
[src]
G: GraphBase,
F: Fn(G::NodeId) -> bool,
pub fn from_fn(graph: G, filter: F) -> Self
[src]
Create an NodeFiltered
adaptor from the closure filter
.
Trait Implementations
impl<G: Copy, F: Copy> Copy for NodeFiltered<G, F>
[src]
impl<G: Clone, F: Clone> Clone for NodeFiltered<G, F>
[src]
fn clone(&self) -> NodeFiltered<G, F>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<G: Debug, F: Debug> Debug for NodeFiltered<G, F>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<G, F> GraphBase for NodeFiltered<G, F> where
G: GraphBase,
[src]
G: GraphBase,
impl<'a, G, F> IntoNeighbors for &'a NodeFiltered<G, F> where
G: IntoNeighbors,
F: FilterNode<G::NodeId>,
[src]
G: IntoNeighbors,
F: FilterNode<G::NodeId>,
type Neighbors = NodeFilteredNeighbors<'a, G::Neighbors, F>
fn neighbors(self, n: G::NodeId) -> Self::Neighbors
[src]
Return an iterator of the neighbors of node a
.
impl<'a, G, F> IntoNeighborsDirected for &'a NodeFiltered<G, F> where
G: IntoNeighborsDirected,
F: FilterNode<G::NodeId>,
[src]
G: IntoNeighborsDirected,
F: FilterNode<G::NodeId>,
type NeighborsDirected = NodeFilteredNeighbors<'a, G::NeighborsDirected, F>
fn neighbors_directed(
self,
n: G::NodeId,
dir: Direction
) -> Self::NeighborsDirected
[src]
self,
n: G::NodeId,
dir: Direction
) -> Self::NeighborsDirected
impl<'a, G, F> IntoNodeIdentifiers for &'a NodeFiltered<G, F> where
G: IntoNodeIdentifiers,
F: FilterNode<G::NodeId>,
[src]
G: IntoNodeIdentifiers,
F: FilterNode<G::NodeId>,
type NodeIdentifiers = NodeFilteredNeighbors<'a, G::NodeIdentifiers, F>
fn node_identifiers(self) -> Self::NodeIdentifiers
[src]
impl<'a, G, F> IntoNodeReferences for &'a NodeFiltered<G, F> where
G: IntoNodeReferences,
F: FilterNode<G::NodeId>,
[src]
G: IntoNodeReferences,
F: FilterNode<G::NodeId>,
type NodeRef = G::NodeRef
type NodeReferences = NodeFilteredNodes<'a, G::NodeReferences, F>
fn node_references(self) -> Self::NodeReferences
[src]
impl<'a, G, F> IntoEdgeReferences for &'a NodeFiltered<G, F> where
G: IntoEdgeReferences,
F: FilterNode<G::NodeId>,
[src]
G: IntoEdgeReferences,
F: FilterNode<G::NodeId>,
type EdgeRef = G::EdgeRef
type EdgeReferences = NodeFilteredEdgeReferences<'a, G, G::EdgeReferences, F>
fn edge_references(self) -> Self::EdgeReferences
[src]
impl<'a, G, F> IntoEdges for &'a NodeFiltered<G, F> where
G: IntoEdges,
F: FilterNode<G::NodeId>,
[src]
G: IntoEdges,
F: FilterNode<G::NodeId>,
impl<G, F> DataMap for NodeFiltered<G, F> where
G: DataMap,
F: FilterNode<G::NodeId>,
[src]
G: DataMap,
F: FilterNode<G::NodeId>,
fn node_weight(&self, id: Self::NodeId) -> Option<&Self::NodeWeight>
[src]
fn edge_weight(&self, id: Self::EdgeId) -> Option<&Self::EdgeWeight>
[src]
impl<G, F> Data for NodeFiltered<G, F> where
G: Data,
[src]
G: Data,
type NodeWeight = G::NodeWeight
type EdgeWeight = G::EdgeWeight
impl<G, F> NodeIndexable for NodeFiltered<G, F> where
G: NodeIndexable,
[src]
G: NodeIndexable,
fn node_bound(&self) -> usize
[src]
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
[src]
Convert a
to an integer index.
fn from_index(&self, i: usize) -> Self::NodeId
[src]
Convert i
to a node index
impl<G, F> GraphProp for NodeFiltered<G, F> where
G: GraphProp,
[src]
G: GraphProp,
impl<G, F> Visitable for NodeFiltered<G, F> where
G: Visitable,
[src]
G: Visitable,