Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

scijs/invert-permutation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

invert-permutation

Computes the inverse of a permutation

Example

console.log( require("invert-permutation")([1,3,0,2]) )
//Prints:
// [ 2, 1, 3, 0 ]

Install

npm install invert-permutation

API

`require("invert-permutation")(perm[, result])

Inverts a permutation

  • perm is the permutation to invert
  • result is an optional array that gets the result of inverting the permutation

Returns result or a newly allocated array if nothing is specified

Credits

(c) 2013 Mikola Lysenko. MIT License

About

Inverts permutations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /