vectorious

TypeScript 中的线性代数。「Linear algebra in TypeScript.」

vectorious

version CDNJS travis maintainability test coverage greenkeeper

A linear algebra library, written in TypeScript and accelerated with C++ bindings to BLAS and LAPACK.

Usage

Follow the installation instructions in nlapack and nblas to get maximum performance.

In node.js

# with C++ bindings
$ npm install vectorious

# or, if you don't want C++ bindings
$ npm install vectorious --no-optional
import v = require('vectorious');

const x = v.random(2, 2);
/*
array([
  [
    0.26472008228302,
    0.4102575480937958
  ],
  [
    0.4068726599216461,
    0.4589384198188782
  ]
], dtype=float32)
*/

const y = v.range(0, 9).reshape(3, 3);
/*
array([
  [ 0, 1, 2 ],
  [ 3, 4, 5 ],
  [ 6, 7, 8 ]
], dtype=float32)
*/

const z = v.array([[1, 2], [3, 4]]);
/*
array([ [ 1, 2 ], [ 3, 4 ] ], dtype=float32)
*/

x.add(z);
/*
array([
  [
    1.26472008228302,
    2.410257577896118
  ],
  [
    3.4068727493286133,
    4.4589385986328125
  ]
], dtype=float32)
*/

In browser

Download dist/vectorious.min.js or search for vectorious on cdnjs.

<script src="vectorious.min.js"></script>
<script>
  const A = v.array([[1], [2], [3]]);
  const B = v.array();
  const C = A.multiply(B);

  console.log('C:', C.toArray());
  /* C: [
    [1, 3, 5],
    [2, 6, 10],
    [3, 9, 15]
  ] */
</script>

Examples

Basic

Machine learning

Documentation

Benchmarks

Run benchmarks with

$ npm run benchmark

主要指标

概览
名称与所有者mateogianolio/vectorious
主编程语言TypeScript
编程语言JavaScript (语言数: 5)
平台
许可证MIT License
所有者活动
创建于2015-03-24 11:49:44
推送于2024-06-16 09:54:25
最后一次提交2024-05-06 08:44:44
发布数48
最新版本名称6.1.14 (发布于 )
第一版名称2.0.0 (发布于 )
用户参与
星数0.9k
关注者数17
派生数44
提交数648
已启用问题?
问题数126
打开的问题数16
拉请求数110
打开的拉请求数1
关闭的拉请求数22
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?