Restricted integer compositions with fixed number of parts

Versione 1.0.0.0 (1,72 KB) da iuvaris
Generate all restricted integer compositions with fixed number of parts, each in the interval [a,b]
443 download
Aggiornato 5 nov 2013

Visualizza la licenza

Matlab implementation of an algorithm that generates all restricted integer compositions of an integer n with k parts, each in the discrete interval [a,b].

The algorithm is based on
Vincent Vajnovszki, Generating permutations with a given major index, http://arxiv.org/abs/1302.6558

(Algorithm in Figure 2). The algorithm appears to be (much) faster than, e.g., the competing JD Opdyke algorithm for the same task.

Cita come

iuvaris (2025). Restricted integer compositions with fixed number of parts (https://it.mathworks.com/matlabcentral/fileexchange/44186-restricted-integer-compositions-with-fixed-number-of-parts), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2010a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Random Number Generation in Help Center e MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0