create-graph-from-matrix

Guide: /guide/algorithms/graph/create-graph-from-matrix

Signature

createGraphFromMatrix(matrix, fieldsList, type);

Params:

NameTypeRequiredDefaultDescription
matrixTypeArrayMatrix+Adjacency matrix N*N
fieldsListArray<T>+Ordered list of all vertices
typeEnumGraphType+UNDIRECTED/DIRECTED

Returns:

IGraph<T>