Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atlassubbed/atlas-dot
https://github.com/atlassubbed/atlas-dot
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/atlassubbed/atlas-dot
- Owner: atlassubbed
- License: other
- Created: 2018-07-15T01:49:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-15T03:19:10.000Z (over 6 years ago)
- Last Synced: 2024-12-05T19:49:13.510Z (about 1 month ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# atlas-dot
Calculates the inner product between two sets of data points.
[![Travis](https://img.shields.io/travis/atlassubbed/atlas-dot.svg)](https://travis-ci.org/atlassubbed/atlas-dot)
---
## install
```
npm install --save atlas-dot
```## why
Breaking up [atlas-dataset](https://github.com/atlassubbed/atlas-dataset#readme) into standalone functions. This module contains the dot product:
## examples
#### v · v
```javascript
const dot = require("atlas-dot")
console.log(dot([1,2]))
// 5
```#### u · v
```javascript
...
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.