Struct petgraph::graph::Frozen [−][src]
pub struct Frozen<'a, G: 'a>(_);
Expand description
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
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,
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,
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
type NodeWeight = G::NodeWeight
type EdgeWeight = G::EdgeWeight
Deref allows transparent access to all shared reference (read-only) functionality in the underlying graph.
Return the number of edges in the graph.
Return an upper bound of the edge indices in the graph (suitable for the size of a bitmap). Read more
Convert i
to an edge index. i
must be a valid value in the graph.
Create the adjacency matrix
type EdgeReferences = G::EdgeReferences
type EdgesDirected = G::EdgesDirected
type NeighborsDirected = G::NeighborsDirected
type NodeIdentifiers = G::NodeIdentifiers
type NodeReferences = G::NodeReferences
Return an upper bound of the node indices in the graph (suitable for the size of a bitmap). Read more
Convert i
to a node index. i
must be a valid value in the graph.