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,
Source§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> Freeze for Reversed<G>where
G: Freeze,
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