nextperm

Outputs the next permutation of the ordered tuple x.
ダウンロード: 968
更新 2010/8/12

ライセンスの表示

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]

引用

Steven Gregory (2024). nextperm (https://www.mathworks.com/matlabcentral/fileexchange/22692-nextperm), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2006a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersLinear Algebra についてさらに検索
謝辞

ヒントを得たファイル: modinv(x, N), logmod

ヒントを与えたファイル: Fast batch generation of permutations, logmod, modinv(x, N), egcd.m

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.1.0.0

Made a small change in the description of the function.

1.0.0.0