JSPM

  • Created
  • Published
  • Downloads 1049
  • Score
    100M100P100Q115054F
  • License MIT

A high performance linear algebra library.

Package Exports

  • vectorious

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vectorious) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vectorious

npm version travis code climate ![test coverage](https://img.shields.io/codeclimate/coverage/github/mateogianolio/vectorious.svg?style=flat&label=test coverage)

Vectorious is a high performance linear algebra library, written in JavaScript and powered by nBLAS for Node.js bindings to CBLAS.

$ npm install vectorious
var vectorious = require('vectorious');

It can be used in the browser too! Download a release and use it like this:

<script src="vectorious-4.1.3.js"></script>
<script>
  var A = new Matrix([
    [1],
    [2],
    [3]
  ]);

  var B = new Matrix([
    [1, 3, 5],
  ]);

  var C = A.multiply(B);
  console.log('C:', C.toArray());
  /* C: [
    [1, 3, 5],
    [2, 6, 10],
    [3, 9, 15]
  ] */
</script>

Documentation

The documentation is located in the 'wiki' section of this repository.

Matrix API
Vector API

Examples

Solve linear systems of equations

Benchmarks

Internal benchmarks are located in the 'wiki' section of this repository.


The following benchmarks compare Vectorious 4.1.0 with three popular matrix/vector libraries:

The graphs show operations per second on the vertical (y) axis.

Vector operations

Below is a graph comparing the vector operations add, angle, dot, magnitude (aka L2-norm), normalize and scale.

The operations were performed on vectors generated with Vector.random(1048576).

Vector operations

Matrix operations

Below is a graph comparing the matrix operations add, scale and transpose.

The operations were performed on matrices generated with Matrix.random(512, 512).

Matrix operations