atlas-dot
v1.0.1
Published
Calculates the inner product between two sets of data points.
Downloads
5
Maintainers
Readme
atlas-dot
Calculates the inner product between two sets of data points.
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.