k-permutations - Factor Documentation

k-permutations


Vocabulary
math .combinatorics

Definition
IN: math.combinatorics

TUPLE: k-permutations length skip k seq ;


Methods
USING: classes.tuple kernel math.combinatorics ;

M: k-permutations hashcode* tuple-hashcode ;


USING: accessors math.combinatorics sequences ;

M: k-permutations length length>> ; inline


USING: accessors kernel math math.combinatorics
math.combinatorics.private sequences sequences.private ;

M: k-permutations nth-unsafe
[ skip>> * ] [ seq>> [ permutation-indices ] keep ]
[ k>> swap [ head ] dip nths-unsafe ] tri ;

AltStyle によって変換されたページ (->オリジナル) /