Algorithm for minimizing the dispersion of the distance between coordinates

I was looking for an algorithm that optimizes the distance between two coordinate lists and chooses which coordinate should go together.

Let's say I have list 1:

205|200
220|210
200|220
200|180

List 2:

210|200
207|190
230|200
234|190

Estimated distance between coords:

205|200 to 210|200 == 5.00
205|200 to 207|190 == 10.20
205|200 to 230|200 == 25.00
205|200 to 234|190 == 30.68

220|210 to 210|200 == 14.14
220|210 to 207|190 == 23.85
220|210 to 230|200 == 14.14
220|210 to 234|190 == 24.41

200|220 to 210|200 == 22.36
200|220 to 207|190 == 30.81
200|220 to 230|200 == 36.06
200|220 to 234|190 == 45.34

200|180 to 210|200 == 22.36
200|180 to 207|190 == 12.21
200|180 to 230|200 == 36.06
200|180 to 234|190 == 35.44

This algorithm selects:

205|200 to 230|200 == 25.00
220|210 to 207|190 == 23.85
200|220 to 210|200 == 22.36
200|180 to 234|190 == 35.44

The algorithm would pick these numbers, as they would be the group that would have the smallest variance between the distances. Conditions:

  • The coordinate can only be used from each list.
  • If list 1 or list2 is larger than it uses only one coordinate once, but it tries to get the least variance of the distance and does nothing with unused coordinates.

If you need more clarification, ask.

P.S. , , , , . , , , , .

+5
1

ICP. .

+1

All Articles