Package Exports
- algebra
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 (algebra) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
algebra
Vectors, Matrices, Tensors for Node.js
For more information point your browser to algebra Homepage.
Status
algebra is under development. Api can change until version 1.0 but not without a good reason.
Synopsis
var algebra = require('algebra');
var R = algebra.Real;
// Static addition operator
console.log(R.add(1, 2, 3)); // 1 + 2 + 3 = 6
// Create two real numbers: x = 2, y = -1
var x = new R(2),
y = new R(-1);
// Operators on objects are mutators. Here x value is modified, multipling it by y value.
x.mul(y);
console.log(x.data); // 2 * (-1) = -2
// Number coercion and chained operators.
// Resulting x value will be 0.25: x -> x + 5 -> x * 2 -> x ^-1
x.add(5).mul(2).inv();
console.log(x.data); // ((-3 + 5) * 2)^(-1) = 0.25
// Vectors, Matrices, Tensors
var R2 = algebra.VectorSpace(R)(2);
var v1 = new R2([0, 1]);
var v2 = new R2([1, -4]);
##See also
- algebra quick start : A 60 seconds tutorial to get your hands dirty with algebra.
Installation
With npm do
$ npm install algebra