Socket
Book a DemoInstallSign in
Socket

cooriented

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cooriented

Checks relative orientation of cells

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

cooriented

Checks relative parity of two sequences. Can be used to evaluate the differential in simplicial homology.

Usage

Via npm:

npm install cooriented
console.log(require("cooriented")([0,1,2], [0,1,2])) // prints +1
console.log(require("cooriented")([0,1,2], [1,0,2])) // prints -1

require("cooriented")(a, b)

Computes the relative orientation of a vs b. This is done by evaluating the Vandermonde polynomials of degree n for a and b, then taking their quotient mod 3. If:

  • a.length !== b.length
  • OR the elements in a and b do not match
  • OR either a or b contains any repeated elements

Then this returns 0.

Credits

(c) 2013 Mikola Lysenko.

Keywords

simplicial

FAQs

Package last updated on 21 Mar 2013

Did you know?

Socket

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.

Install

Related posts