[−][src]Struct petgraph::graph::Frozen
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, N, E, Ty, Ix> Frozen<'a, Graph<N, E, Ty, Ix>> where
Ty: EdgeType,
Ix: IndexType,
[src][−]
Ty: EdgeType,
Ix: IndexType,
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]
G: Data,
type NodeWeight = G::NodeWeight
type EdgeWeight = G::EdgeWeight
impl<'a, G> DataMap for Frozen<'a, G> where
G: DataMap,
[src][+]
G: DataMap,
impl<'a, G> DataMapMut for Frozen<'a, G> where
G: DataMapMut,
[src][+]
G: DataMapMut,
impl<'a, G> Deref for Frozen<'a, G>
[src][+]
impl<'a, G> GetAdjacencyMatrix for Frozen<'a, G> where
G: GetAdjacencyMatrix,
[src][+]
G: GetAdjacencyMatrix,
impl<'a, G> GraphBase for Frozen<'a, G> where
G: GraphBase,
[src]
G: GraphBase,
impl<'a, G> GraphProp for Frozen<'a, G> where
G: GraphProp,
[src][+]
G: GraphProp,
impl<'a, G, I> Index<I> for Frozen<'a, G> where
G: Index<I>,
[src][+]
G: Index<I>,
impl<'a, G, I> IndexMut<I> for Frozen<'a, G> where
G: IndexMut<I>,
[src][+]
G: IndexMut<I>,
impl<'a, 'b, G> IntoEdgeReferences for &'b Frozen<'a, G> where
G: IntoEdgeReferences,
[src][+]
G: IntoEdgeReferences,
impl<'a, 'b, G> IntoEdges for &'b Frozen<'a, G> where
G: IntoEdges,
[src][+]
G: IntoEdges,
impl<'a, 'b, G> IntoEdgesDirected for &'b Frozen<'a, G> where
G: IntoEdgesDirected,
[src][+]
G: IntoEdgesDirected,
impl<'a, 'b, G> IntoNeighbors for &'b Frozen<'a, G> where
G: IntoNeighbors,
[src][+]
G: IntoNeighbors,
impl<'a, 'b, G> IntoNeighborsDirected for &'b Frozen<'a, G> where
G: IntoNeighborsDirected,
[src][+]
G: IntoNeighborsDirected,
impl<'a, 'b, G> IntoNodeIdentifiers for &'b Frozen<'a, G> where
G: IntoNodeIdentifiers,
[src][+]
G: IntoNodeIdentifiers,
impl<'a, 'b, G> IntoNodeReferences for &'b Frozen<'a, G> where
G: IntoNodeReferences,
[src][+]
G: IntoNodeReferences,
impl<'a, G> NodeCompactIndexable for Frozen<'a, G> where
G: NodeCompactIndexable,
[src]
G: NodeCompactIndexable,
impl<'a, G> NodeCount for Frozen<'a, G> where
G: NodeCount,
[src][+]
G: NodeCount,
impl<'a, G> NodeIndexable for Frozen<'a, G> where
G: NodeIndexable,
[src][+]
G: NodeIndexable,
impl<'a, G> Visitable for Frozen<'a, G> where
G: Visitable,
[src][+]
G: Visitable,
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,
impl<'a, G> Unpin for Frozen<'a, G>
impl<'a, G> !UnwindSafe for Frozen<'a, G>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,