pub struct Reversed<G>(pub G);
Expand description
An edge-reversing graph adaptor.
All edges have the opposite direction with Reversed
.
Tuple Fields§
§0: G
Trait Implementations§
source§impl<G> Data for Reversed<G>where
G: Data,
impl<G> Data for Reversed<G>where
G: Data,
type NodeWeight = <G as Data>::NodeWeight
type EdgeWeight = <G as Data>::EdgeWeight
source§impl<G> DataMap for Reversed<G>where
G: DataMap,
impl<G> DataMap for Reversed<G>where
G: DataMap,
fn node_weight(&self, id: Self::NodeId) -> Option<&Self::NodeWeight>
fn edge_weight(&self, id: Self::EdgeId) -> Option<&Self::EdgeWeight>
source§impl<G> DataMapMut for Reversed<G>where
G: DataMapMut,
impl<G> DataMapMut for Reversed<G>where
G: DataMapMut,
fn node_weight_mut(&mut self, id: Self::NodeId) -> Option<&mut Self::NodeWeight>
fn edge_weight_mut(&mut self, id: Self::EdgeId) -> Option<&mut Self::EdgeWeight>
source§impl<G> EdgeCount for Reversed<G>where
G: EdgeCount,
impl<G> EdgeCount for Reversed<G>where
G: EdgeCount,
source§fn edge_count(&self) -> usize
fn edge_count(&self) -> usize
Return the number of edges in the graph.
source§impl<G> EdgeIndexable for Reversed<G>where
G: EdgeIndexable,
impl<G> EdgeIndexable for Reversed<G>where
G: EdgeIndexable,
source§fn 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).
source§fn 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.source§impl<G> GetAdjacencyMatrix for Reversed<G>where
G: GetAdjacencyMatrix,
impl<G> GetAdjacencyMatrix for Reversed<G>where
G: GetAdjacencyMatrix,
§type AdjMatrix = <G as GetAdjacencyMatrix>::AdjMatrix
type AdjMatrix = <G as GetAdjacencyMatrix>::AdjMatrix
The associated adjacency matrix type
source§fn adjacency_matrix(&self) -> Self::AdjMatrix
fn adjacency_matrix(&self) -> Self::AdjMatrix
Create the adjacency matrix
source§impl<G> IntoEdgeReferences for Reversed<G>where
G: IntoEdgeReferences,
impl<G> IntoEdgeReferences for Reversed<G>where
G: IntoEdgeReferences,
type EdgeRef = ReversedEdgeReference<<G as IntoEdgeReferences>::EdgeRef>
type EdgeReferences = ReversedEdgeReferences<<G as IntoEdgeReferences>::EdgeReferences>
fn edge_references(self) -> Self::EdgeReferences
source§impl<G> IntoEdges for Reversed<G>where
G: IntoEdgesDirected,
impl<G> IntoEdges for Reversed<G>where
G: IntoEdgesDirected,
type Edges = ReversedEdges<<G as IntoEdgesDirected>::EdgesDirected>
fn edges(self, a: Self::NodeId) -> Self::Edges
source§impl<G> IntoEdgesDirected for Reversed<G>where
G: IntoEdgesDirected,
impl<G> IntoEdgesDirected for Reversed<G>where
G: IntoEdgesDirected,
type EdgesDirected = ReversedEdges<<G as IntoEdgesDirected>::EdgesDirected>
fn edges_directed(self, a: Self::NodeId, dir: Direction) -> Self::Edges
source§impl<G> IntoNeighbors for Reversed<G>where
G: IntoNeighborsDirected,
impl<G> IntoNeighbors for Reversed<G>where
G: IntoNeighborsDirected,
type Neighbors = <G as IntoNeighborsDirected>::NeighborsDirected
source§fn neighbors(self, n: G::NodeId) -> G::NeighborsDirected
fn neighbors(self, n: G::NodeId) -> G::NeighborsDirected
Return an iterator of the neighbors of node
a
.source§impl<G> IntoNeighborsDirected for Reversed<G>where
G: IntoNeighborsDirected,
impl<G> IntoNeighborsDirected for Reversed<G>where
G: IntoNeighborsDirected,
type NeighborsDirected = <G as IntoNeighborsDirected>::NeighborsDirected
fn neighbors_directed(self, n: G::NodeId, d: Direction) -> G::NeighborsDirected
source§impl<G> IntoNodeIdentifiers for Reversed<G>where
G: IntoNodeIdentifiers,
impl<G> IntoNodeIdentifiers for Reversed<G>where
G: IntoNodeIdentifiers,
type NodeIdentifiers = <G as IntoNodeIdentifiers>::NodeIdentifiers
fn node_identifiers(self) -> Self::NodeIdentifiers
source§impl<G> IntoNodeReferences for Reversed<G>where
G: IntoNodeReferences,
impl<G> IntoNodeReferences for Reversed<G>where
G: IntoNodeReferences,
type NodeRef = <G as IntoNodeReferences>::NodeRef
type NodeReferences = <G as IntoNodeReferences>::NodeReferences
fn node_references(self) -> Self::NodeReferences
source§impl<G> NodeIndexable for Reversed<G>where
G: NodeIndexable,
impl<G> NodeIndexable for Reversed<G>where
G: NodeIndexable,
source§fn 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).
source§fn 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.impl<G: Copy> Copy for Reversed<G>
impl<G: GraphRef> GraphRef for Reversed<G>
impl<G> NodeCompactIndexable for Reversed<G>where
G: NodeCompactIndexable,
Auto Trait Implementations§
impl<G> RefUnwindSafe for Reversed<G>where
G: RefUnwindSafe,
impl<G> Send for Reversed<G>where
G: Send,
impl<G> Sync for Reversed<G>where
G: Sync,
impl<G> Unpin for Reversed<G>where
G: Unpin,
impl<G> UnwindSafe for Reversed<G>where
G: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more