Struct petgraph::graph::Frozen [] [src]

pub struct Frozen<'a, G: 'a>(_);

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 change.

Methods

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]

Access the weight for node a, mutably.

Also available with indexing syntax: &mut graph[a].

Access the weight for edge e, mutably.

Also available with indexing syntax: &mut graph[e].

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> Deref for Frozen<'a, G>
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<'a, G, I> Index<I> for Frozen<'a, G> where G: Index<I>
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<'a, G, I> IndexMut<I> for Frozen<'a, G> where G: IndexMut<I>
[src]

The method for the mutable indexing (container[index]) operation

impl<'a, G> GraphBase for Frozen<'a, G> where G: GraphBase
[src]

node identifier

edge identifier

impl<'a, 'b, G> IntoNeighbors for &'b Frozen<'a, G> where &'b G: IntoNeighbors, G: GraphBase<NodeId=&'b G::NodeId>
[src]

Return an iterator of the neighbors of node a.

impl<'a, G> Visitable for Frozen<'a, G> where G: Visitable
[src]

The associated map type

Create a new visitor map

Reset the visitor map (and resize to new size of graph if needed)