spektra
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

  1. Eigenvalues

    const { eigenvalues } = require('spectra');
    const A = [[1, 2], [2, 1]];
    const eig = eigenvalues(A);
    console.log(eig);
    // [3, -1]
  2. Determinant

    const { determinant } = require('spectra');
    const A = [[1, 2], [2, 1]];
    const det = determinant(A);
    console.log(det);
    // -3
  3. Mean

    const { mean } = require('spectra');
    const A = [[1, 2], [2, 1]];
    const m = mean(A);
    console.log(m);
    // 1.5

Roadmap

  1. Adjacency matrix
  2. Laplacian matrix.
  3. Characteristic polynomial
  4. 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.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i spektra

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

5.26 kB

Total Files

13

Last publish

Collaborators

  • jaysonmulwa