https://github.com/mljs/sparse-matrix
Sparse matrix library
https://github.com/mljs/sparse-matrix
Last synced: 2 months ago
JSON representation
Sparse matrix library
- Host: GitHub
- URL: https://github.com/mljs/sparse-matrix
- Owner: mljs
- License: mit
- Created: 2016-05-17T07:19:18.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2024-08-24T05:41:04.000Z (10 months ago)
- Last Synced: 2025-04-01T15:41:45.044Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.23 MB
- Stars: 4
- Watchers: 4
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# sparse-matrix
[![NPM version][npm-image]][npm-url]
[![coverage status][codecov-image]][codecov-url]
[![npm download][download-image]][download-url]Sparse matrix library.
## Installation
`$ npm i ml-sparse-matrix`
## Usage
```js
import { SparseMatrix } from "ml-sparse-matrix";const matrix1 = new SparseMatrix([
[1, 2],
[3, 4],
]);
const matrix2 = new SparseMatrix([
[0, 5],
[6, 7],
]);
const product = matrix1.kroneckerProduct(matrix2);
```## [API Documentation](https://mljs.github.io/sparse-matrix/)
## License
[MIT](./LICENSE)
[npm-image]: https://img.shields.io/npm/v/ml-sparse-matrix.svg?style=flat-square
[npm-url]: https://npmjs.org/package/ml-sparse-matrix
[codecov-image]: https://codecov.io/github/mljs/sparse-matrix/coverage.svg?style=flat-square
[codecov-url]: https://codecov.io/github/mljs/sparse-matrix
[download-image]: https://img.shields.io/npm/dm/ml-sparse-matrix.svg?style=flat-square
[download-url]: https://npmjs.org/package/ml-sparse-matrix