make a graph with edges when the euclidic distance is small enough
<p>programmers,
I want to make a graph with edges between the points for which the Euclidic distance smaller is then a given number, say six.
The list I have looks like this: 
[[987, 654, 5.830951894845301], [987, 321, 11.0], [654, 987, 5.830951894845301], [654, 321, 5.196152422706632], [321, 987, 11.0], [321, 654, 5.196152422706632]]
The first two elements of each little list are the compared nodes and the third element is the euclidic distance.
The output should have an edge between 987 and 654 and between 654 and 321 but not between 321 and 987.
Thanks for your help.</p>
