danmatrix
v1.1.3
Published
Utilities to handle and manipulate 2d-vectors
Downloads
5
Readme
DanMatrix
DanMatrix is a data structure able to handle and manipulate 2D-vectors
How to use it
import { DanMatrix } from 'danmatrix';
const matrix = new DanMatrix<string>([
['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa'],
['b', 'bb', 'bbb', 'bbbb', 'bbbbb', 'bbbbbb'],
['c', 'cc', 'ccc', 'cccc', 'ccccc', 'cccccc'],
['d', 'dd', 'ddd', 'dddd', 'ddddd', 'dddddd'],
['e', 'ee', 'eee', 'eeee', 'eeeee', 'eeeeee'],
['f', 'ff', 'fff', 'ffff', 'fffff', 'ffffff']
]);
matrix.addRow(['g', 'gg', 'ggg', 'gggg', 'ggggg', 'gggggg']);
matrix.removeColumnAt(1);
console.log(matrix.getMatrixString());
Documentation
Scripts
Build project
npm run build
Build documentation
npm run build:doc
Run tests
npm run test