baxy77bax has asked for the wisdom of the Perl Monks concerning the following question:
a problem :)
what would be the fastest way to order the following objects.
given that i know the closest objects toO1 O2 O3 ...
the number of objects is 100 and each object is associated with a list of 4 closest objects to it. Order of those objects is related to its distance. Therefore O3 is closer to O1 then to O5.O1 are O3, O5, O11, O73 O2 are O72, O54, O12, O7 O3 are O1, O6, O5, O12 ...
Therefore i am not asking for code but a descriptive solutions, hints, pointers :)
thnx
baxy
UPDATE:
to simplify things even more let say all distances are a single unit. so O1 is one unit from O3 and 2 units from O5.
but yes i see it now this i a tough one...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sorting problem
by moritz (Cardinal) on Apr 26, 2014 at 13:29 UTC | |
by choroba (Cardinal) on Apr 26, 2014 at 13:34 UTC | |
|
Re: Sorting problem
by hdb (Monsignor) on Apr 26, 2014 at 11:36 UTC | |
|
Re: Sorting problem
by choroba (Cardinal) on Apr 26, 2014 at 12:03 UTC |