Struct petgraph::visit::NodeFiltered[][src]

pub struct NodeFiltered<G, F>(pub G, pub F);
Expand description

A node-filtering graph adaptor.

Implementations

impl<F, G> NodeFiltered<G, F> where
    G: GraphBase,
    F: Fn(G::NodeId) -> bool
[src]

pub fn from_fn(graph: G, filter: F) -> Self[src]

Create an NodeFiltered adaptor from the closure filter.

Trait Implementations

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, F> Data for NodeFiltered<G, F> where
    G: Data
[src]

impl<G, F> DataMap for NodeFiltered<G, F> where
    G: DataMap,
    F: FilterNode<G::NodeId>, 
[src]

fn node_weight(&self, id: Self::NodeId) -> Option<&Self::NodeWeight>[src]

fn edge_weight(&self, id: Self::EdgeId) -> Option<&Self::EdgeWeight>[src]

impl<G: Debug, F: Debug> Debug for NodeFiltered<G, F>[src]

fn fmt(&self, f: &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]

type NodeId = G::NodeId

node identifier

type EdgeId = G::EdgeId

edge identifier

impl<G, F> GraphProp for NodeFiltered<G, F> where
    G: GraphProp
[src]

type EdgeType = G::EdgeType

The kind edges in the graph.

fn is_directed(&self) -> bool[src]

impl<'a, G, F> IntoEdgeReferences for &'a NodeFiltered<G, F> where
    G: IntoEdgeReferences,
    F: FilterNode<G::NodeId>, 
[src]

impl<'a, G, F> IntoEdges for &'a NodeFiltered<G, F> where
    G: IntoEdges,
    F: FilterNode<G::NodeId>, 
[src]

type Edges = NodeFilteredEdges<'a, G, G::Edges, F>

fn edges(self, a: G::NodeId) -> Self::Edges[src]

impl<'a, G, F> IntoNeighbors for &'a NodeFiltered<G, F> where
    G: IntoNeighbors,
    F: FilterNode<G::NodeId>, 
[src]

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]

type NeighborsDirected = NodeFilteredNeighbors<'a, G::NeighborsDirected, F>

fn neighbors_directed(
    self,
    n: G::NodeId,
    dir: Direction
) -> Self::NeighborsDirected
[src]

impl<'a, G, F> IntoNodeIdentifiers for &'a NodeFiltered<G, F> where
    G: IntoNodeIdentifiers,
    F: FilterNode<G::NodeId>, 
[src]

impl<'a, G, F> IntoNodeReferences for &'a NodeFiltered<G, F> where
    G: IntoNodeReferences,
    F: FilterNode<G::NodeId>, 
[src]

impl<G, F> NodeIndexable for NodeFiltered<G, F> where
    G: NodeIndexable
[src]

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> Visitable for NodeFiltered<G, F> where
    G: Visitable
[src]

type Map = G::Map

The associated map type

fn visit_map(&self) -> Self::Map[src]

Create a new visitor map

fn reset_map(&self, map: &mut Self::Map)[src]

Reset the visitor map (and resize to new size of graph if needed)

impl<G: Copy, F: Copy> Copy for NodeFiltered<G, F>[src]

Auto Trait Implementations

impl<G, F> RefUnwindSafe for NodeFiltered<G, F> where
    F: RefUnwindSafe,
    G: RefUnwindSafe

impl<G, F> Send for NodeFiltered<G, F> where
    F: Send,
    G: Send

impl<G, F> Sync for NodeFiltered<G, F> where
    F: Sync,
    G: Sync

impl<G, F> Unpin for NodeFiltered<G, F> where
    F: Unpin,
    G: Unpin

impl<G, F> UnwindSafe for NodeFiltered<G, F> where
    F: UnwindSafe,
    G: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.