Trait petgraph::visit::GetAdjacencyMatrix [] [src]

pub trait GetAdjacencyMatrix: GraphBase {
    type AdjMatrix;
    fn adjacency_matrix(&self) -> Self::AdjMatrix;
fn is_adjacent(
        &self,
        matrix: &Self::AdjMatrix,
        a: Self::NodeId,
        b: Self::NodeId
    ) -> bool; }

Create or access the adjacency matrix of a graph.

The implementor can either create an adjacency matrix, or it can return a placeholder if it has the needed representation internally.

Associated Types

The associated adjacency matrix type

Required Methods

Create the adjacency matrix

Return true if there is an edge from a to b, false otherwise.

Computes in O(1) time.

Implementations on Foreign Types

impl<'a, G> GetAdjacencyMatrix for &'a G where
    G: GetAdjacencyMatrix
[src]

[src]

[src]

Implementors