JSPM

ml-nearest-vector

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 62434
  • Score
    100M100P100Q169201F
  • License MIT

Find the nearest point to a sample point

Package Exports

  • ml-nearest-vector

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ml-nearest-vector) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

nearest-vector

NPM version build status Test coverage David deps npm download

Find the nearest point to a sample point

Installation

$ npm install ml-nearest-vector

API Documentation

Example

const nearestVector = require('ml-nearest-vector');

let centers = [[1, 2, 1], [-1, -1, -1]];
nearestVector(centers, [1, 2, 1]) === 0;

License

MIT