Struct petgraph::graph::Frozen [−][src]
pub struct Frozen<'a, G: 'a>(_);
Frozen
is a graph wrapper.
The Frozen
only allows shared access (read-only) to the
underlying graph G
, but it allows mutable access to its
node and edge weights.
This is used to ensure immutability of the graph’s structure while permitting weights to be both read and written.
See indexing implementations and the traits Data
and DataMap
for read-write access to the graph’s weights.
Implementations
impl<'a, G> Frozen<'a, G>
[src]
impl<'a, G> Frozen<'a, G>
[src]impl<'a, N, E, Ty, Ix> Frozen<'a, Graph<N, E, Ty, Ix>> where
Ty: EdgeType,
Ix: IndexType,
[src]
impl<'a, N, E, Ty, Ix> Frozen<'a, Graph<N, E, Ty, Ix>> where
Ty: EdgeType,
Ix: IndexType,
[src]pub fn index_twice_mut<T, U>(
&mut self,
i: T,
j: U
) -> (&mut <Graph<N, E, Ty, Ix> as Index<T>>::Output, &mut <Graph<N, E, Ty, Ix> as Index<U>>::Output) where
Graph<N, E, Ty, Ix>: IndexMut<T> + IndexMut<U>,
T: GraphIndex,
U: GraphIndex,
[src]
&mut self,
i: T,
j: U
) -> (&mut <Graph<N, E, Ty, Ix> as Index<T>>::Output, &mut <Graph<N, E, Ty, Ix> as Index<U>>::Output) where
Graph<N, E, Ty, Ix>: IndexMut<T> + IndexMut<U>,
T: GraphIndex,
U: GraphIndex,
Index the Graph
by two indices, any combination of
node or edge indices is fine.
Panics if the indices are equal or if they are out of bounds.
Trait Implementations
impl<'a, G> Data for Frozen<'a, G> where
G: Data,
[src]
impl<'a, G> Data for Frozen<'a, G> where
G: Data,
[src]type NodeWeight = G::NodeWeight
type EdgeWeight = G::EdgeWeight
impl<'a, G> DataMap for Frozen<'a, G> where
G: DataMap,
[src]
impl<'a, G> DataMap for Frozen<'a, G> where
G: DataMap,
[src]fn node_weight(&self, id: Self::NodeId) -> Option<&Self::NodeWeight>
[src]
fn edge_weight(&self, id: Self::EdgeId) -> Option<&Self::EdgeWeight>
[src]
impl<'a, G> DataMapMut for Frozen<'a, G> where
G: DataMapMut,
[src]
impl<'a, G> DataMapMut for Frozen<'a, G> where
G: DataMapMut,
[src]fn node_weight_mut(&mut self, id: Self::NodeId) -> Option<&mut Self::NodeWeight>
[src]
fn edge_weight_mut(&mut self, id: Self::EdgeId) -> Option<&mut Self::EdgeWeight>
[src]
impl<'a, G> Deref for Frozen<'a, G>
[src]
impl<'a, G> Deref for Frozen<'a, G>
[src]Deref allows transparent access to all shared reference (read-only) functionality in the underlying graph.
impl<'a, G> GetAdjacencyMatrix for Frozen<'a, G> where
G: GetAdjacencyMatrix,
[src]
impl<'a, G> GetAdjacencyMatrix for Frozen<'a, G> where
G: GetAdjacencyMatrix,
[src]impl<'a, 'b, G> IntoEdgeReferences for &'b Frozen<'a, G> where
G: IntoEdgeReferences,
[src]
impl<'a, 'b, G> IntoEdgeReferences for &'b Frozen<'a, G> where
G: IntoEdgeReferences,
[src]type EdgeRef = G::EdgeRef
type EdgeReferences = G::EdgeReferences
fn edge_references(self) -> Self::EdgeReferences
[src]
impl<'a, 'b, G> IntoEdgesDirected for &'b Frozen<'a, G> where
G: IntoEdgesDirected,
[src]
impl<'a, 'b, G> IntoEdgesDirected for &'b Frozen<'a, G> where
G: IntoEdgesDirected,
[src]type EdgesDirected = G::EdgesDirected
fn edges_directed(self, a: Self::NodeId, dir: Direction) -> Self::EdgesDirected
[src]
impl<'a, 'b, G> IntoNeighbors for &'b Frozen<'a, G> where
G: IntoNeighbors,
[src]
impl<'a, 'b, G> IntoNeighbors for &'b Frozen<'a, G> where
G: IntoNeighbors,
[src]impl<'a, 'b, G> IntoNeighborsDirected for &'b Frozen<'a, G> where
G: IntoNeighborsDirected,
[src]
impl<'a, 'b, G> IntoNeighborsDirected for &'b Frozen<'a, G> where
G: IntoNeighborsDirected,
[src]type NeighborsDirected = G::NeighborsDirected
fn neighbors_directed(
self,
n: Self::NodeId,
d: Direction
) -> Self::NeighborsDirected
[src]
self,
n: Self::NodeId,
d: Direction
) -> Self::NeighborsDirected
impl<'a, 'b, G> IntoNodeIdentifiers for &'b Frozen<'a, G> where
G: IntoNodeIdentifiers,
[src]
impl<'a, 'b, G> IntoNodeIdentifiers for &'b Frozen<'a, G> where
G: IntoNodeIdentifiers,
[src]type NodeIdentifiers = G::NodeIdentifiers
fn node_identifiers(self) -> Self::NodeIdentifiers
[src]
impl<'a, 'b, G> IntoNodeReferences for &'b Frozen<'a, G> where
G: IntoNodeReferences,
[src]
impl<'a, 'b, G> IntoNodeReferences for &'b Frozen<'a, G> where
G: IntoNodeReferences,
[src]type NodeRef = G::NodeRef
type NodeReferences = G::NodeReferences
fn node_references(self) -> Self::NodeReferences
[src]
impl<'a, G> NodeIndexable for Frozen<'a, G> where
G: NodeIndexable,
[src]
impl<'a, G> NodeIndexable for Frozen<'a, G> where
G: NodeIndexable,
[src]impl<'a, G> NodeCompactIndexable for Frozen<'a, G> where
G: NodeCompactIndexable,
[src]
G: NodeCompactIndexable,
Auto Trait Implementations
impl<'a, G> RefUnwindSafe for Frozen<'a, G> where
G: RefUnwindSafe,
G: RefUnwindSafe,
impl<'a, G> Send for Frozen<'a, G> where
G: Send,
G: Send,
impl<'a, G> Sync for Frozen<'a, G> where
G: Sync,
G: Sync,