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;
}
Expand description
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
Required methods
fn adjacency_matrix(&self) -> Self::AdjMatrix
fn adjacency_matrix(&self) -> Self::AdjMatrix
Create the adjacency matrix
Implementations on Foreign Types
Implementors
impl<'a, N, E, Ty, Ix> GetAdjacencyMatrix for &'a Csr<N, E, Ty, Ix> where
Ix: IndexType,
Ty: EdgeType,
impl<'a, N, E, Ty, Ix> GetAdjacencyMatrix for &'a Csr<N, E, Ty, Ix> where
Ix: IndexType,
Ty: EdgeType,
The adjacency matrix for Csr is a bitmap that’s computed by
.adjacency_matrix()
.
type AdjMatrix = FixedBitSet
The adjacency matrix for List is a bitmap that’s computed by
.adjacency_matrix()
.
type AdjMatrix = FixedBitSet
impl<N, E, Ty, Ix> GetAdjacencyMatrix for Graph<N, E, Ty, Ix> where
Ty: EdgeType,
Ix: IndexType,
impl<N, E, Ty, Ix> GetAdjacencyMatrix for Graph<N, E, Ty, Ix> where
Ty: EdgeType,
Ix: IndexType,
The adjacency matrix for Graph is a bitmap that’s computed by
.adjacency_matrix()
.