nextperm

Outputs the next permutation of the ordered tuple x.

Sie verfolgen jetzt diese Einreichung

Using lexical order on the set {1, 2, ..., N}, outputs the next permutation of the ordered tuple x. You have exhausted the list when All(nextperm(x,N) == x) is TRUE.

For example
nextperm([1 5 4], 5) returns [2 1 3]
nextperm([2 1 3], 5) returns [2 1 4]
nextperm([5 4 3], 5) returns [5 4 3]

Zitieren als

Steven Gregory (2026). nextperm (https://de.mathworks.com/matlabcentral/fileexchange/22692-nextperm), MATLAB Central File Exchange. Abgerufen .

Quellenangaben

Inspiriert von: modinv(x, N), logmod

Inspiriert: Fast batch generation of permutations, logmod, modinv(x, N), egcd.m

Kategorien

Mehr zu Linear Algebra finden Sie in Help Center und MATLAB Answers

Allgemeine Informationen

Kompatibilität der MATLAB-Version

  • Kompatibel mit allen Versionen

Plattform-Kompatibilität

  • Windows
  • macOS
  • Linux
Version Veröffentlicht Versionshinweise Action
1.1.0.0

Made a small change in the description of the function.

1.0.0.0