// output of ./demo/comb/mixedradix-prefix-cond-demo.cc: // Description: //% Mixed radix counting with restricted prefixes. arg 1: 4 == n [Number of digits] default=4 arg 2: 1 == rr [Base (radix) of digits (0==>falling factorial, 1==>rising factorial)] default=1 arg 3: 4 == c [Condition function: 0 ==> all words (condition always true), 1 ==> no two adjacent nonzero digits, 2 ==> adjacent digits distinct 3 ==> sorted (weakly ascending) digits 4 ==> smooth: adjacent digits have absolute difference <= 1 5 ==> adjacent digits have different parities] default=4 Predicate 4 := cond_smooth 1: [ . . . . ] 2: [ . . . 1 ] 3: [ . . 1 . ] 4: [ . . 1 1 ] 5: [ . . 1 2 ] 6: [ . 1 . . ] 7: [ . 1 . 1 ] 8: [ . 1 1 . ] 9: [ . 1 1 1 ] 10: [ . 1 1 2 ] 11: [ . 1 2 1 ] 12: [ . 1 2 2 ] 13: [ . 1 2 3 ] 14: [ 1 . . . ] 15: [ 1 . . 1 ] 16: [ 1 . 1 . ] 17: [ 1 . 1 1 ] 18: [ 1 . 1 2 ] 19: [ 1 1 . . ] 20: [ 1 1 . 1 ] 21: [ 1 1 1 . ] 22: [ 1 1 1 1 ] 23: [ 1 1 1 2 ] 24: [ 1 1 2 1 ] 25: [ 1 1 2 2 ] 26: [ 1 1 2 3 ] 27: [ 1 2 1 . ] 28: [ 1 2 1 1 ] 29: [ 1 2 1 2 ] 30: [ 1 2 2 1 ] 31: [ 1 2 2 2 ] 32: [ 1 2 2 3 ] 33: [ 1 2 3 2 ] 34: [ 1 2 3 3 ] 35: [ 1 2 3 4 ] ct=35