size - the amount of domain elements in the preference order
public int getWeight(int n)
returns the weight based on the rank in the ranking function.
e.g. the second-highest ranked element of five will get the weight
(size=5)-1-(rank=1) = 5-1-1 = 3, where the highest will get weight 4 (5-1-0)
and the last element will get weight 0, (5-1-4)