danmatrix
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

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

Package Sidebar

Install

npm i danmatrix

Weekly Downloads

12

Version

1.1.3

License

ISC

Unpacked Size

950 kB

Total Files

93

Last publish

Collaborators

  • heavydany