Skip to content

num::linear::to_sparse_adjacency

Defined in header <linear/graph/laplacian.hpp>

template <typename Weight = real, typename Index = idx>
spmat to_sparse_adjacency(const graph<Weight, Index> &g);

Construct the adjacency matrix of a graph, sparse: \(W_{ij} = w_{ij}\).