math.combinatorics vocabulary
Factor handbook > Vocabulary index


Summary
Permutations and combinations

Meta-data
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?( ... seq k quot: ( ... elt -- ... ? ) -- ... ? )
all-permutations( seq -- seq' )
all-permutations?( ... seq quot: ( ... elt -- ... ? ) -- ... ? )
all-subsets( seq -- subsets )
combination( m seq k -- seq' )
each-combination( ... seq k quot: ( ... elt -- ... ) -- ... )
each-permutation( ... seq quot: ( ... elt -- ... ) -- ... )
factorial( n -- n! )
filter-combinations( ... seq k quot: ( ... elt -- ... ? ) -- ... newseq )
filter-permutations( ... seq quot: ( ... elt -- ... ? ) -- ... newseq )
find-combination( ... seq k quot: ( ... elt -- ... ? ) -- ... elt/f )
find-permutation( ... seq quot: ( ... elt -- ... ? ) -- ... elt/f )
inverse-permutation( seq -- permutation )
map-combinations( ... seq k quot: ( ... elt -- ... newelt ) -- ... newseq )
map-permutations( ... seq quot: ( ... elt -- ... newelt ) -- ... newseq )
map>assoc-combinations( ... 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-permutations( ... seq identity quot: ( ... prev elt -- ... next ) -- ... result )
selections( seq n -- selections )


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


Files


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


Children
VocabularySummary
math.combinatorics.privatemath.combinatorics.private vocabulary