Hi All,

I have an application which has a two dimensional array of 24 rows 
each containing 20 floating point values.  I need to analyse every 
single combination of every single set of 24 values.  Essentially I 
only need to obtain the top 5 values for each permutation, many of 
which are going to be the same of course.

Idea A) I had originally thought of a looping mechanism to get a set 
of 24 values, sort them, grab the top 5 and so on.  However, there 
are 20 ^ 24 combinations, and I suspect this will be incredibly time consuming.

Idea B) Then I thought about just comparing within the loops, and 
only grabbing the top 5 values - but again I'm doing billions of 
comparisons and so perhaps this is just as bad.

Idea C) I then thought that perhaps I could start off with a subset 
of the permutations, and try to determine whether the other values 
outside the permutations would affect the order, and analyse that 
way... I'm not even sure I have this idea straight in my head yet nor 
whether it would a) work, or b) be any faster than the two ideas above.

I don't need any more than 3 decimal place accuracy, so I could 
convert these values to integers, if that makes any difference.

Does anyone have any suggestions for me?

Cheers,
Chris.

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to