I have (I think) a non trivial sort to apply. Objects are always described by caracteristics.
An object could have, say, one ore more caracteristic.
A battery could be described by it's capacity in mAH. A laptop could have a battery (and inherit a capacity)
If capacity is a boolean, placed in caracteristic[0], and weight is another boolean placed in [1]. Say the laptop has a keyboard, and the US type is a boolean placed in [2]. A battery has no keyboard. So, applied on the battery, the boolean at [2] is False.
The laptop could be described by (x^2+x+1) and the battery could be described by (x+1).
I have too deal with ~x^100 and billions of objects.
I need to sort by : - the minimum of x's - the lowest mouvement between an object and it's successor - at equal mouvements, the lowest significant exponent.
I have no idea to deal with.