Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 482 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 482 Bytes

easy-matrix

An easy to use Matrix library

Getting started

npm i -s easy-matrix

Basic example

Lets look at a common use case of adding two matrices

const { Matrix } = require('easy-matrix');

const mat1 = new Matrix(5,5, {mapper: (i,j) => i+j});
const mat2 = new Matrix(5,5, {mapper: (i,j) => i});

/* 
the output will be a new Matrix instance which contains 
the result of the matrices addition 
*/
const additionResult = mat1.plus(mat2);