Skip to content

Commit

Permalink
6.0.0-beta.0 (#161)
Browse files Browse the repository at this point in the history
* NDArray restructured, tests passing

* finishing touches on NDArray

* prepare Vector and Matrix, fix tslint

* restructure methods of Vector

* disable duplication checks

* ...

* improve types, replace *.call(this, ...) with this.*(...)

* passing tests and lint

* upd dependencies, fix vulns, upd benchmarks, upd docs

* fix docs

* improve docs

* upd travis buildspec

* upgrade matplotnode to 0.4.1

* upgrade matplotnode to 0.4.2

* add libpython-dev to travis buildspec

* upd g++ to 4.9

* rm clang

* nyc config updates

* fix issues with inheritance, split up tests into separate files, rearrange stuff

* upgrade deps

* fix #39

* improvements

* minor cleanup

* cleanup jacobi method

* add lapack optimisations, rename some methods

* dist + docs

* ...

* benchmarks

* add dtype

* improvements

* switch version from 6.0.0 to 6.0.0-beta.0
  • Loading branch information
mateogianolio authored Aug 6, 2019
1 parent c5a10cf commit a57ab87
Show file tree
Hide file tree
Showing 333 changed files with 29,245 additions and 15,364 deletions.
2 changes: 2 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
version: 2
plugins:
duplication:
enabled: false
tslint:
config: tsconfig.json
enabled: true
Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: vectorious
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
coverage
.DS_Store
built
benchmarks
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ language: node_js
node_js:
- "lts/*"
before_install:
- sudo apt-get install libblas-dev
- sudo apt-get install libblas-dev libpython-dev
install:
- npm install
env:
global:
- CXX=g++-4.8
- CXX=g++-4.9
- CC_TEST_REPORTER_ID=7bc2ff765ac0619975d32fe57959db6374d14a96780a1438ec68ea14036748e1
before_script:
- npm install -g nyc
Expand All @@ -22,6 +24,4 @@ addons:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- clang
- g++-4.9
89 changes: 13 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
![vectorious](https://github.com/mateogianolio/vectorious/raw/master/logo.gif)

[![Backers on Open Collective](https://opencollective.com/vectorious/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/vectorious/sponsors/badge.svg)](#sponsors) ![version](https://img.shields.io/npm/v/vectorious.svg) [![CDNJS](https://img.shields.io/cdnjs/v/vectorious.svg)](https://cdnjs.com/libraries/vectorious) ![travis](https://img.shields.io/travis/mateogianolio/vectorious.svg?style=flat&label=build) [![maintainability](https://api.codeclimate.com/v1/badges/0b4035b94b0e84c5ac55/maintainability)](https://codeclimate.com/github/mateogianolio/vectorious/maintainability) [![test coverage](https://api.codeclimate.com/v1/badges/0b4035b94b0e84c5ac55/test_coverage)](https://codeclimate.com/github/mateogianolio/vectorious/test_coverage)
[![Backers on Open Collective](https://opencollective.com/vectorious/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/vectorious/sponsors/badge.svg)](#sponsors) ![version](https://img.shields.io/npm/v/vectorious.svg) [![CDNJS](https://img.shields.io/cdnjs/v/vectorious.svg)](https://cdnjs.com/libraries/vectorious) ![travis](https://img.shields.io/travis/mateogianolio/vectorious.svg?style=flat&label=build) [![maintainability](https://api.codeclimate.com/v1/badges/0b4035b94b0e84c5ac55/maintainability)](https://codeclimate.com/github/mateogianolio/vectorious/maintainability) [![test coverage](https://api.codeclimate.com/v1/badges/0b4035b94b0e84c5ac55/test_coverage)](https://codeclimate.com/github/mateogianolio/vectorious/test_coverage) [![greenkeeper](https://badges.greenkeeper.io/mateogianolio/vectorious.svg)](https://greenkeeper.io/)

> A linear algebra library, written in TypeScript and accelerated with C++ bindings to [BLAS](http://www.netlib.org/blas/).
> A linear algebra library, written in TypeScript and accelerated with C++ bindings to [BLAS](http://www.netlib.org/blas/) and [LAPACK](http://www.netlib.org/lapack/).
### Usage

[![greenkeeper](https://badges.greenkeeper.io/mateogianolio/vectorious.svg)](https://greenkeeper.io/)
Follow the installation instructions in [nlapack](https://github.com/nperf/nlapack) and [nblas](https://github.com/nperf/nblas) to get maximum performance.

##### In node.js
#### In node.js

```bash
# with BLAS bindings
# with C++ bindings
$ npm install vectorious

# or, if you don't want BLAS bindings
# or, if you don't want C++ bindings
$ npm install vectorious --no-optional
```

Expand All @@ -37,43 +37,12 @@ Matrix {
0.5198025534810546 ],
type: [Function: Float32Array] }
*/

const y: Vector = Vector.random(4, -5, 5, Int8Array);
/*
Vector {
type: [Function: Int8Array],
data: Int8Array [ -2, 2, 2, -1 ],
length: 4 }
*/

const z = new NDArray([[[1], [2]]]).add(new NDArray([[[3], [4]]]));
/*
NDArray {
data: Float32Array [ 4, 6 ],
length: 2,
shape: [ 1, 2, 1 ],
type: [Function: Float32Array] }
*/
```

Will use your local BLAS copy (if any). Some notes for different operating systems:

* **OSX** - by default included in the Accelerate framework
* **Debian/Ubuntu** - different options, easiest is to `apt-get install libblas-dev`
* **Windows** - https://icl.cs.utk.edu/lapack-for-windows/

##### In browser

Download a [**release**](https://github.com/mateogianolio/vectorious/releases) and use it like this:
#### In browser

```html
<script src="vectorious.min.js"></script>
```

Or if you prefer to use a CDN:

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/vectorious/5.3.1/vectorious.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vectorious/6.0.0/vectorious.min.js"></script>
```

```html
Expand All @@ -94,7 +63,6 @@ Or if you prefer to use a CDN:
### Examples

**Basic**

* [**Solving linear systems of equations**](https://github.com/mateogianolio/vectorious/tree/master/examples/solve.js)
* [**Using low-level BLAS routines**](https://github.com/mateogianolio/vectorious/tree/master/examples/blas.js)

Expand All @@ -104,48 +72,17 @@ Or if you prefer to use a CDN:

### Documentation

The documentation is located in the wiki section of this repository.

[**Go to wiki.**](https://github.com/mateogianolio/vectorious/wiki)
* [**API Documentation**](https://mateogianolio.github.io/vectorious)
* [**Usage guides**](https://github.com/mateogianolio/vectorious/wiki)

### Benchmarks

Benchmarks are performed using `Float32Array` of size `n` (matrices are sized `sqrt(n) x sqrt(n)`).
Run benchmarks with

#### Specs

```
Macbook Pro Early '15
Processor: 2,7 GHz Intel Core i5
Memory: 8 GB 1867 MHz DDR3
GPU: Intel Iris Graphics 6100 1536 MB
```bash
$ npm run benchmark
```

#### Results

| Matrix | | |
|---------|--------|--------|
| ![add](benchmarks/Matrix/add.png) | ![augment](benchmarks/Matrix/augment.png) | ![binOp](benchmarks/Matrix/binOp.png) |
| ![determinant](benchmarks/Matrix/determinant.png) | ![diag](benchmarks/Matrix/diag.png) | ![gauss](benchmarks/Matrix/gauss.png) |
| ![inverse](benchmarks/Matrix/inverse.png) | ![lu](benchmarks/Matrix/lu.png) | ![multiply](benchmarks/Matrix/multiply.png) |
| ![plu](benchmarks/Matrix/plu.png) | ![product](benchmarks/Matrix/product.png) | ![rank](benchmarks/Matrix/rank.png) |
| ![rowAdd](benchmarks/Matrix/rowAdd.png) | ![scale](benchmarks/Matrix/scale.png) | ![solve](benchmarks/Matrix/solve.png) |
| ![subtract](benchmarks/Matrix/subtract.png) | ![swap](benchmarks/Matrix/swap.png) | ![trace](benchmarks/Matrix/trace.png) |
| ![transpose](benchmarks/Matrix/transpose.png) | | |

| Vector | | |
|---------|--------|--------|
| ![add](benchmarks/Vector/add.png) | ![angle](benchmarks/Vector/angle.png) | ![binOp](benchmarks/Vector/binOp.png) |
| ![combine](benchmarks/Vector/combine.png) | ![dot](benchmarks/Vector/dot.png) | ![normalize](benchmarks/Vector/normalize.png) |
| ![project](benchmarks/Vector/project.png) | ![scale](benchmarks/Vector/scale.png) | ![subtract](benchmarks/Vector/subtract.png) |

| NDArray | | |
|---------|--------|--------|
| ![add](benchmarks/NDArray/add.png) | ![copy](benchmarks/NDArray/copy.png) | ![dot](benchmarks/NDArray/dot.png) |
| ![magnitude](benchmarks/NDArray/magnitude.png) | ![max](benchmarks/NDArray/max.png) | ![min](benchmarks/NDArray/min.png) |
| ![product](benchmarks/NDArray/product.png) | ![scale](benchmarks/NDArray/scale.png) | ![subtract](benchmarks/NDArray/subtract.png) |


## Contributors

This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
Expand Down
Binary file removed benchmarks/Matrix/add.png
Binary file not shown.
Binary file removed benchmarks/Matrix/augment.png
Binary file not shown.
Binary file removed benchmarks/Matrix/binOp.png
Binary file not shown.
Binary file removed benchmarks/Matrix/determinant.png
Binary file not shown.
Binary file removed benchmarks/Matrix/diag.png
Binary file not shown.
Binary file removed benchmarks/Matrix/gauss.png
Binary file not shown.
Binary file removed benchmarks/Matrix/inverse.png
Binary file not shown.
Binary file removed benchmarks/Matrix/lu.png
Binary file not shown.
Binary file removed benchmarks/Matrix/multiply.png
Binary file not shown.
Binary file removed benchmarks/Matrix/plu.png
Binary file not shown.
Binary file removed benchmarks/Matrix/product.png
Binary file not shown.
Binary file removed benchmarks/Matrix/rank.png
Binary file not shown.
Binary file removed benchmarks/Matrix/rowAdd.png
Binary file not shown.
Binary file removed benchmarks/Matrix/scale.png
Binary file not shown.
Binary file removed benchmarks/Matrix/solve.png
Binary file not shown.
Binary file removed benchmarks/Matrix/subtract.png
Binary file not shown.
Binary file removed benchmarks/Matrix/swap.png
Binary file not shown.
Binary file removed benchmarks/Matrix/trace.png
Binary file not shown.
Binary file removed benchmarks/Matrix/transpose.png
Binary file not shown.
Binary file removed benchmarks/NDArray/add.png
Binary file not shown.
Binary file removed benchmarks/NDArray/copy.png
Binary file not shown.
Binary file removed benchmarks/NDArray/dot.png
Binary file not shown.
Binary file removed benchmarks/NDArray/magnitude.png
Binary file not shown.
Binary file removed benchmarks/NDArray/max.png
Binary file not shown.
Binary file removed benchmarks/NDArray/min.png
Binary file not shown.
Binary file removed benchmarks/NDArray/product.png
Diff not rendered.
Binary file removed benchmarks/NDArray/scale.png
Diff not rendered.
Binary file removed benchmarks/NDArray/subtract.png
Diff not rendered.
Binary file removed benchmarks/Vector/add.png
Diff not rendered.
Binary file removed benchmarks/Vector/angle.png
Diff not rendered.
Binary file removed benchmarks/Vector/binOp.png
Diff not rendered.
Binary file removed benchmarks/Vector/combine.png
Diff not rendered.
Binary file removed benchmarks/Vector/dot.png
Diff not rendered.
Binary file removed benchmarks/Vector/normalize.png
Diff not rendered.
Binary file removed benchmarks/Vector/project.png
Diff not rendered.
Binary file removed benchmarks/Vector/scale.png
Diff not rendered.
Binary file removed benchmarks/Vector/subtract.png
Diff not rendered.
2 changes: 1 addition & 1 deletion dist/vectorious.min.js

Large diffs are not rendered by default.

Empty file removed docs/.nojekyll
Empty file.
Loading

0 comments on commit a57ab87

Please sign in to comment.