0

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.

mat.viguier
  • 127
  • 1
  • 1
  • 11
  • It's not very clear to me what you mean by "lowest movement between an object and its successor" (maybe number of different coefficients?) but if it's clear for you (and if that's gives you a unique way to sort your elements) what is the problem? – Manlio Apr 17 '16 at 18:15
  • Yes, number of changing coefficients. I need to keep as closest as possible objects that have the same coefficients, and, then, sort by the number of coefficients the sorted groups. But I think, there is a coeherent way to implement that. – mat.viguier Apr 17 '16 at 18:19

0 Answers0