dstructs

0.0.1 • Public • Published

dstructs

NPM version Build Status Coverage Status Dependencies

Data structures.

Installation

$ npm install dstructs

For use in the browser, use browserify.

Usage

var dstructs = require( 'dstructs' );

dstructs.array( x[, dtype] )

Array data structure.

var arr = dstructs.array( 5, 'int8' );
// returns Int8Array([0,0,0,0,0])

dstructs.matrix( [data,] shape[, dtype] )

Matrix data structure.

var mat = dstructs.matrix( [5,2], 'float64' );
/*
    [ 0 0 
      0 0
      0 0
      0 0
      0 0 ]
*/

Examples

var dstructs = require( 'dstructs' );

To run the example code from the top-level application directory,

$ node ./examples/index.js

Tests

Unit

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.

Test Coverage

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

License

MIT license.

Copyright

Copyright © 2015. The Compute.io Authors.

Package Sidebar

Install

npm i dstructs

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • kgryte