Skip to content

spion/array-2d.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

array-2d

Fast 2d array suitable for dynamic programming

example

var Array2d = require('array-2d');
var arr = new Array2d(10, 5, 1)
arr.set(3,4,2);
console.log(arr.get(3,4))
console.log(arr.toString());

api

array2d(rows, cols, defaultValue)

Create a new 2d array with the specified rows, columns and default value

arr.get(row, col)

Get the element at position row, column

arr.set(row, col, value)

Set the element at row, column to the specified value

licence

ISC

About

Fast 2d array suitable for dynamic programming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published