Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
convex-hull
Advanced tools
This module is a wrapper over various convex hull modules which exposes a simple interface for computing convex hulls of point sets in any dimension.
var ch = require('convex-hull')
var points = [
[0,0],
[1,0],
[0,1],
[0.15,0.15],
[0.5, 0.5]
]
//Picture:
//
// [0,1] *
// |\
// | \
// | \
// | \
// | \
// | \
// | \
// | * [0.5,0.5]
// | \
// | \
// | \
// | \
// | \
// | * \
// | [0.15,0.15] \
// [0,0] *---------------* [1,0]
//
console.log(ch(points))
Output:
[[0, 1], [1, 2], [2, 0]]
npm install convex-hull
If you want to use it in a webpage, use browserify.
require('convex-hull')(points)
Computes the convex hull of points
points
is an array of points encoded as d
length arraysReturns A polytope encoding the convex hull of the point set.
Time complexity The procedure takes O(n^floor(d/2) + n log(n)) time.
Note This module is a wrapper over incremental-convex-hull and monotone-convex-hull for convenience. It will select an optimal algorithm for whichever dimension is appropriate.
(c) 2014 Mikola Lysenko. MIT License
FAQs
Any dimensional convex hull
The npm package convex-hull receives a total of 29,374 weekly downloads. As such, convex-hull popularity was classified as popular.
We found that convex-hull demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.