1.1 --- a/optimiser.py Sat Oct 10 15:36:48 2015 +0200
1.2 +++ b/optimiser.py Sat Oct 10 15:59:38 2015 +0200
1.3 @@ -24,7 +24,6 @@
1.4 from os.path import split, splitext
1.5 import EXIF
1.6 import PIL.Image
1.7 -import itertools
1.8 import sys
1.9
1.10 # Image operations.
1.11 @@ -50,22 +49,6 @@
1.12 d.sort(reverse=True)
1.13 return d
1.14
1.15 -def get_combinations(c, n):
1.16 -
1.17 - """
1.18 - Get combinations of colours from 'c' of size 'n' in decreasing order of
1.19 - probability.
1.20 - """
1.21 -
1.22 - all = []
1.23 - for l in itertools.combinations(c, n):
1.24 - total = 0
1.25 - for f, value in l:
1.26 - total += f
1.27 - all.append((total, l))
1.28 - all.sort(reverse=True)
1.29 - return [l for total, l in all]
1.30 -
1.31 def test():
1.32
1.33 "Generate slices of the colour cube."