spektra
v1.0.1
Published
spectral graph theory
Downloads
2
Readme
Spektra
spectral graph theory library
In mathematics, spectral graph theory is the study of the properties of a graph in relationship to the characteristic polynomial, eigenvalues, and eigenvectors of matrices associated with the graph, such as its adjacency matrix or Laplacian matrix.
Installation
$ npm install spektra
Features
Eigenvalues
const { eigenvalues } = require('spectra'); const A = [[1, 2], [2, 1]]; const eig = eigenvalues(A); console.log(eig); // [3, -1]
Determinant
const { determinant } = require('spectra'); const A = [[1, 2], [2, 1]]; const det = determinant(A); console.log(det); // -3
Mean
const { mean } = require('spectra'); const A = [[1, 2], [2, 1]]; const m = mean(A); console.log(m); // 1.5
Roadmap
- Adjacency matrix
- Laplacian matrix.
- Characteristic polynomial
- Cospectrality
Contribute
There are many ways to contribute to Spectra.
- Submit bugs and help us verify fixes as they are checked in.
- Review the source code changes.