Skip to content

Function: fromAdjacencyMatrix() ​

ts
function fromAdjacencyMatrix(matrix, options?): GraphData;

A graph from a square adjacency matrix: matrix[i][j] is the weight of the link from row i to column j. Entries that are not finite numbers are no link; the diagonal gives self-links.

Parameters ​

ParameterType
matrixArrayLike<ArrayLike<number>>
optionsAdjacencyMatrixOptions

Returns ​

GraphData

Released under the MIT License.