Commit 62215584 authored by Karim El Sheikh's avatar Karim El Sheikh
Browse files

More efficient Colour compareTo (Compares Key Sizes first).

kWL() method has been clarified with comments, and cleaned up for better readability.
Message for the number of colour classes at the end of Round 0 is now always printed regardless whether the groups have not or have been differentiated. At the end of other Rounds it was always printed.
Pairs of elements are now chosen starting from index 1 because index 0 contained the identity element.
Changed one message in compareColours to be slightly more concise.
Removed all extra IndexedTreeMap Subclasses, but kept a new one with generic Key and Integer Value. It is used in the kWL method, and in the Colour Class to implement multisets efficiently.
Parsing the commands "kWL( ..." is now more efficient because the permutations are now passed as indices instead of a new String object.
Other minor changes.
parent 6a1b4b57
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment