math.combinatorics vocabulary
Factor handbook ยป Vocabulary index


Summary
Permutations and combinations

Metadata
Tags:math
Authors:Slava Pestov, Doug Coleman, Aaron Schaefer


Words

Tuple classes
ClassSuperclassSlots
combinations tupleseq k length
k-permutations tuplelength skip k seq
permutations tuplelength seq


Ordinary words
WordStack effect
<combinations>( seq k -- combinations )
<k-permutations>( seq k -- permutations )
<permutations>( seq -- permutations )
all-combinations( seq k -- seq' )
all-combinations-with-replacement( seq k -- seq' )
all-combinations-with-replacement?( ... seq k quot: ( ... elt -- ... ? ) -- ... ? )
all-combinations?( ... seq k quot: ( ... elt -- ... ? ) -- ... ? )
all-permutations( seq -- seq' )
all-permutations?( ... seq quot: ( ... elt -- ... ? ) -- ... ? )
all-selections( seq n -- seq' )
all-selections?( seq n -- ? )
all-subsets( seq -- subsets )
all-unique-combinations( seq n -- seq' )
all-unique-permutations( seq -- seq' )
combination( m seq k -- seq' )
each-combination( ... seq k quot: ( ... elt -- ... ) -- ... )
each-combination-with-replacement( ... seq k quot: ( ... elt -- ... ) -- ... )
each-permutation( ... seq quot: ( ... elt -- ... ) -- ... )
each-selection( ... seq n quot: ( ... elt -- ... ) -- ... )
each-unique-permutation( ... seq quot: ( ... elt -- ... ) -- ... )
factorial( n -- n! )
filter-combinations( ... seq k quot: ( ... elt -- ... ? ) -- ... newseq )
filter-combinations-with-replacement( ... seq k quot: ( ... elt -- ... ? ) -- ... newseq )
filter-permutations( ... seq quot: ( ... elt -- ... ? ) -- ... newseq )
filter-selections( ... seq n quot: ( ... elt -- ... newelt ) -- ... newseq )
find-combination( ... seq k quot: ( ... elt -- ... ? ) -- ... elt/f )
find-combination-with-replacement( ... seq k quot: ( ... elt -- ... ? ) -- ... elt/f )
find-permutation( ... seq quot: ( ... elt -- ... ? ) -- ... elt/f )
find-selection( ... seq n quot: ( ... elt -- ... ? ) -- ... elt/f )
inverse-permutation( seq -- permutation )
map-combinations( ... seq k quot: ( ... elt -- ... newelt ) -- ... newseq )
map-combinations-with-replacement( ... seq k quot: ( ... elt -- ... newelt ) -- ... newseq )
map-permutations( ... seq quot: ( ... elt -- ... newelt ) -- ... newseq )
map-selections( ... seq n quot: ( ... elt -- ... newelt ) -- ... newseq )
map>assoc-combinations( ... seq k quot: ( ... elt -- ... key value ) exemplar -- ... assoc )
map>assoc-combinations-with-replacement( ... seq k quot: ( ... elt -- ... key value ) exemplar -- ... assoc )
nCk( n k -- nCk )
nPk( n k -- nPk )
next-permutation( seq -- seq )
permutation( n seq -- seq' )
reduce-combinations( ... seq k identity quot: ( ... prev elt -- ... next ) -- ... result )
reduce-combinations-with-replacement( ... seq k identity quot: ( ... prev elt -- ... next ) -- ... result )
reduce-permutations( ... seq identity quot: ( ... prev elt -- ... next ) -- ... result )
reduce-selections( ... seq n identity quot: ( ... prev elt -- ... next ) -- ... result )


Class predicate words
WordStack effect
combinations?( object -- ? )
k-permutations?( object -- ? )
permutations?( object -- ? )


Files


Metadata files


Children from resource:extra
VocabularySummary
math.combinatorics.bitsBitwise permutations


Children
VocabularySummary
math.combinatorics.private