permutation-parity

WebJar for permutation-parity

License

License

MIT
Categories

Categories

Parity Business Logic Libraries Financial
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

permutation-parity
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

permutation-parity
WebJar for permutation-parity
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/scijs/permutation-parity

Download permutation-parity

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/permutation-parity/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>permutation-parity</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/permutation-parity/
implementation 'org.webjars.npm:permutation-parity:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/permutation-parity/
implementation ("org.webjars.npm:permutation-parity:1.0.0")
'org.webjars.npm:permutation-parity:jar:1.0.0'
<dependency org="org.webjars.npm" name="permutation-parity" rev="1.0.0">
  <artifact name="permutation-parity" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='permutation-parity', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "permutation-parity" % "1.0.0"
[org.webjars.npm/permutation-parity "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : typedarray-pool jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

permutation-parity

Computes the parity of a permutation.

Example

var sgn = require("permutation-parity")

console.log(sgn([0, 1, 2]), sgn([0, 2, 1]))

Install

npm install permutation-parity

API

require("permutation-parity")(p)

Determines the sign of a permutation

  • p is a permutation

Returns The sign of the permutation:

  • 1 if p is odd
  • -1 if p is even
  • 0 if p is not a permutation

Credits

(c) 2014 Mikola Lysenko. MIT License

org.webjars.npm

Versions

Version
1.0.0