// output of ./demo/comb/setpart-demo.cc: // Description: //% Set partitions. arg 1: 5 == n [Partition set of n elements] default=5 arg 2: 1 == xdr [Change direction in recursion ==> minimal-change order] default=1 arg 3: 1 == dr0 [Starting direction in recursion (+-1)] default=1 arg 4: 0 == px [If !=0, only list partitions into exactly nx sets] default=0 arg 5: 1 == priq [Option: print internal state with each partition] default=1 1: as[ 0 0 0 0 0 ] ns[ 1 1 1 1 1 ] d[ + + + + + ] x[ +1 +2 +3 +4 -5 ] {1, 2, 3, 4, 5} 2: as[ 0 0 0 0 1 ] ns[ 1 1 1 1 2 ] d[ + + + + + ] x[ +1 +2 +3 -4 -5 ] {1, 2, 3, 4}, {5} 3: as[ 0 0 0 1 2 ] ns[ 1 1 1 2 3 ] d[ + + + + - ] x[ +1 +2 -3 -4 -5 ] {1, 2, 3}, {4}, {5} 4: as[ 0 0 0 1 1 ] ns[ 1 1 1 2 2 ] d[ + + + + - ] x[ +1 +2 -3 +4 -5 ] {1, 2, 3}, {4, 5} 5: as[ 0 0 0 1 0 ] ns[ 1 1 1 2 2 ] d[ + + + + - ] x[ +1 +2 +3 -5 -4 ] {1, 2, 3, 5}, {4} 6: as[ 0 0 1 2 0 ] ns[ 1 1 2 3 3 ] d[ + + + - + ] x[ +1 +2 -5 -3 -4 ] {1, 2, 5}, {3}, {4} 7: as[ 0 0 1 2 1 ] ns[ 1 1 2 3 3 ] d[ + + + - + ] x[ +1 -2 +3 -5 -4 ] {1, 2}, {3, 5}, {4} 8: as[ 0 0 1 2 2 ] ns[ 1 1 2 3 3 ] d[ + + + - + ] x[ +1 -2 -3 +4 -5 ] {1, 2}, {3}, {4, 5} 9: as[ 0 0 1 2 3 ] ns[ 1 1 2 3 4 ] d[ + + + - + ] x[ +1 -2 -3 -4 -5 ] {1, 2}, {3}, {4}, {5} 10: as[ 0 0 1 1 2 ] ns[ 1 1 2 2 3 ] d[ + + + - - ] x[ +1 -2 +3 -4 -5 ] {1, 2}, {3, 4}, {5} 11: as[ 0 0 1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+ ] x[ -1 +2 -4 -3 -5 ] {1}, {2, 4}, {3}, {5} 24: as[ 0 1 2 2 3 ] ns[ 1 2 3 3 4 ] d[ + + - + - ] x[ -1 -2 +3 -4 -5 ] {1}, {2}, {3, 4}, {5} 25: as[ 0 1 2 2 2 ] ns[ 1 2 3 3 3 ] d[ + + - + - ] x[ -1 -2 +3 +4 -5 ] {1}, {2}, {3, 4, 5} 26: as[ 0 1 2 2 1 ] ns[ 1 2 3 3 3 ] d[ + + - + - ] x[ -1 +2 -5 +3 -4 ] {1}, {2, 5}, {3, 4} 27: as[ 0 1 2 2 0 ] ns[ 1 2 3 3 3 ] d[ + + - + - ] x[ +1 -5 -2 +3 -4 ] {1, 5}, {2}, {3, 4} 28: as[ 0 1 2 3 0 ] ns[ 1 2 3 4 4 ] d[ + + - + + ] x[ +1 -5 -2 -3 -4 ] {1, 5}, {2}, {3}, {4} 29: as[ 0 1 2 3 1 ] ns[ 1 2 3 4 4 ] d[ + + - + + ] x[ -1 +2 -5 -3 -4 ] {1}, {2, 5}, {3}, {4} 30: as[ 0 1 2 3 2 ] ns[ 1 2 3 4 4 ] d[ + + - + + ] x[ -1 -2 +3 -5 -4 ] {1}, {2}, {3, 5}, {4} 31: as[ 0 1 2 3 3 ] ns[ 1 2 3 4 4 ] d[ + + - + + ] x[ -1 -2 -3 +4 -5 ] {1}, {2}, {3}, {4, 5} 32: as[ 0 1 2 3 4 ] ns[ 1 2 3 4 5 ] d[ + + - + + ] x[ -1 -2 -3 -4 -5 ] {1}, {2}, {3}, {4}, {5} 33: as[ 0 1 1 2 3 ] ns[ 1 2 2 3 4 ] d[ + + - - - ] x[ -1 +2 -3 -4 -5 ] {1}, {2, 3}, {4}, {5} 34: as[ 0 1 1 2 2 ] ns[ 1 2 2 3 3 ] d[ + + - - - ] x[ -1 +2 -3 +4 -5 ] {1}, {2, 3}, {4, 5} 35: as[ 0 1 1 2 1 ] ns[ 1 2 2 3 3 ] d[ + + - - - ] x[ -1 +2 +3 -5 -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