pub trait NavigableGraph: ImmutableGraphContainer + Sized {
    type OutNeighbors<'a>: Iterator<Item = Neighbor<Self::NodeIndex, Self::EdgeIndex>>
       where Self: 'a;
    type InNeighbors<'a>: Iterator<Item = Neighbor<Self::NodeIndex, Self::EdgeIndex>>
       where Self: 'a;
    type EdgesBetween<'a>: Iterator<Item = Self::EdgeIndex>
       where Self: 'a;

Show 13 methods // Required methods fn out_neighbors(&self, node_id: Self::NodeIndex) -> Self::OutNeighbors<'_>; fn in_neighbors(&self, node_id: Self::NodeIndex) -> Self::InNeighbors<'_>; fn edges_between( &self, from_node_id: Self::NodeIndex, to_node_id: Self::NodeIndex ) -> Self::EdgesBetween<'_>; // Provided methods fn contains_edge_between( &self, from: Self::NodeIndex, to: Self::NodeIndex ) -> bool { ... } fn edge_count_between( &self, from: Self::NodeIndex, to: Self::NodeIndex ) -> usize { ... } fn out_degree(&self, node_id: Self::NodeIndex) -> usize { ... } fn in_degree(&self, node_id: Self::NodeIndex) -> usize { ... } fn is_biunivocal_node(&self, node_id: Self::NodeIndex) -> bool { ... } fn is_bivalent_node(&self, node_id: Self::NodeIndex) -> bool { ... } fn is_split_edge(&self, edge_id: Self::EdgeIndex) -> bool { ... } fn is_join_edge(&self, edge_id: Self::EdgeIndex) -> bool { ... } fn is_split_node(&self, node_id: Self::NodeIndex) -> bool { ... } fn is_join_node(&self, node_id: Self::NodeIndex) -> bool { ... }
}
Expand description

A graph that can be navigated, i.e. that can iterate the neighbors of its nodes.

Required Associated Types§

source

type OutNeighbors<'a>: Iterator<Item = Neighbor<Self::NodeIndex, Self::EdgeIndex>> where Self: 'a

The iterator type used to iterate over the outgoing neighbors of a node.

source

type InNeighbors<'a>: Iterator<Item = Neighbor<Self::NodeIndex, Self::EdgeIndex>> where Self: 'a

The iterator type used to iterate over the incoming neighbors of a node.

source

type EdgesBetween<'a>: Iterator<Item = Self::EdgeIndex> where Self: 'a

The iterator type used to iterate over the edges between two nodes.

Required Methods§

source

fn out_neighbors(&self, node_id: Self::NodeIndex) -> Self::OutNeighbors<'_>

Returns an iterator over the outgoing neighbors of the given node.

source

fn in_neighbors(&self, node_id: Self::NodeIndex) -> Self::InNeighbors<'_>

Returns an iterator over the incoming neighbors of the given node.

source

fn edges_between( &self, from_node_id: Self::NodeIndex, to_node_id: Self::NodeIndex ) -> Self::EdgesBetween<'_>

Returns an iterator over the edges (from_node_id, to_node_id).

Provided Methods§

source

fn contains_edge_between( &self, from: Self::NodeIndex, to: Self::NodeIndex ) -> bool

Returns true if the graph contains an edge (from, to).

source

fn edge_count_between( &self, from: Self::NodeIndex, to: Self::NodeIndex ) -> usize

Returns the amount of edges (from, to).

source

fn out_degree(&self, node_id: Self::NodeIndex) -> usize

Returns the amount of outgoing edges from a node.

source

fn in_degree(&self, node_id: Self::NodeIndex) -> usize

Returns the amount of incoming edges to a node.

source

fn is_biunivocal_node(&self, node_id: Self::NodeIndex) -> bool

Returns true if the given node has indegree == 1 and outdegree == 1.

source

fn is_bivalent_node(&self, node_id: Self::NodeIndex) -> bool

Returns true if the given node has indegree > 1 and outdegree > 1.

source

fn is_split_edge(&self, edge_id: Self::EdgeIndex) -> bool

Returns true if the given edge’s tail has outdegree > 1.

source

fn is_join_edge(&self, edge_id: Self::EdgeIndex) -> bool

Returns true if the given edge’s head has indegree > 1.

source

fn is_split_node(&self, node_id: Self::NodeIndex) -> bool

Returns true if the given node has outdegree > 1.

source

fn is_join_node(&self, node_id: Self::NodeIndex) -> bool

Returns true if the given node has indegree > 1.

Implementors§

source§

impl<Graph: NavigableGraph> NavigableGraph for BitVectorSubgraph<'_, Graph>

§

type OutNeighbors<'a> = FilterNeighborIterator<'a, <Graph as NavigableGraph>::OutNeighbors<'a>, BitVectorSubgraph<'_, Graph>> where Self: 'a

§

type InNeighbors<'a> = FilterNeighborIterator<'a, <Graph as NavigableGraph>::InNeighbors<'a>, BitVectorSubgraph<'_, Graph>> where Self: 'a

§

type EdgesBetween<'a> = FilterEdgeIndexIterator<'a, <Graph as NavigableGraph>::EdgesBetween<'a>, BitVectorSubgraph<'_, Graph>> where Self: 'a

source§

impl<Graph: NavigableGraph> NavigableGraph for IncrementalSubgraph<'_, Graph>

§

type OutNeighbors<'a> = FilterNeighborIterator<'a, <Graph as NavigableGraph>::OutNeighbors<'a>, IncrementalSubgraph<'_, Graph>> where Self: 'a

§

type InNeighbors<'a> = FilterNeighborIterator<'a, <Graph as NavigableGraph>::InNeighbors<'a>, IncrementalSubgraph<'_, Graph>> where Self: 'a

§

type EdgesBetween<'a> = FilterEdgeIndexIterator<'a, <Graph as NavigableGraph>::EdgesBetween<'a>, IncrementalSubgraph<'_, Graph>> where Self: 'a

source§

impl<NodeData, EdgeData> NavigableGraph for PetGraph<NodeData, EdgeData>

§

type OutNeighbors<'a> = Map<Edges<'a, EdgeData, Directed, usize>, fn(_: EdgeReference<'a, EdgeData, usize>) -> Neighbor<<PetGraph<NodeData, EdgeData> as GraphBase>::NodeIndex, <PetGraph<NodeData, EdgeData> as GraphBase>::EdgeIndex>> where NodeData: 'a, EdgeData: 'a

§

type InNeighbors<'a> = Map<Edges<'a, EdgeData, Directed, usize>, fn(_: EdgeReference<'a, EdgeData, usize>) -> Neighbor<<PetGraph<NodeData, EdgeData> as GraphBase>::NodeIndex, <PetGraph<NodeData, EdgeData> as GraphBase>::EdgeIndex>> where NodeData: 'a, EdgeData: 'a

§

type EdgesBetween<'a> = Map<EdgesConnecting<'a, EdgeData, Directed, usize>, fn(_: EdgeReference<'a, EdgeData, usize>) -> <PetGraph<NodeData, EdgeData> as GraphBase>::EdgeIndex> where NodeData: 'a, EdgeData: 'a