Data structures.
$ npm install dstructs
For use in the browser, use browserify.
var dstructs = require( 'dstructs' );
Array data structure.
var arr = dstructs.array( 5, 'int8' );
// returns Int8Array([0,0,0,0,0])
Matrix data structure.
var mat = dstructs.matrix( [5,2], 'float64' );
/*
[ 0 0
0 0
0 0
0 0
0 0 ]
*/
var dstructs = require( 'dstructs' );
To run the example code from the top-level application directory,
$ node ./examples/index.js
Unit tests use the Mocha test framework with Chai assertions. To run the tests, execute the following command in the top-level application directory:
$ make test
All new feature development should have corresponding unit tests to validate correct functionality.
This repository uses Istanbul as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:
$ make test-cov
Istanbul creates a ./reports/coverage
directory. To access an HTML version of the report,
$ make view-cov
Copyright © 2015. The Compute.io Authors.