I generated following Table:
here | there | cost
-------+-------+--------------+
{1,1} | {1,2} | 0.0 |
{1,1} | {2,1} | 0.0 |
{1,2} | {1,3} | 1.0 |
{2,1} | {2,2} | 1.0 |
{2,1} | {3,1} | 1.0 |
{1,2} | {2,2} | 1.0 |
{1,3} | {1,4} | 2.0 |
{2,2} | {2,3} | 2.0 |
...
{1,2} | {1,3} | 3.0 |
As you can see, I have two different costs for the pair {1,2}, {1,3}
How can i manage to keep just the best value for each pair ?