1.0.1 • Published 6 years ago

atlas-dot v1.0.1

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
6 years ago

atlas-dot

Calculates the inner product between two sets of data points.

Travis


install

npm install --save atlas-dot

why

Breaking up atlas-dataset into standalone functions. This module contains the dot product:

examples

v · v

const dot = require("atlas-dot")
console.log(dot([1,2]))
// 5 

u · v

...
console.log(dot([1,2], [3,4]))
// 11

caveats

Input checking is the responsibility of the caller. Make sure your arrays contain numbers and are of the same length.