Don't include self in tomography

This commit is contained in:
Ross McFarland 2016-05-15 06:13:52 -07:00
parent ba6d402e85
commit 885dd87fec

View File

@ -289,10 +289,11 @@ App.NodesShowRoute = App.BaseRoute.extend({
dc.coordinates.forEach(function (node) {
if (params.name == node.Node) {
dc.coordinates.forEach(function (other) {
// TODO: ignore self
var dist = distance(node, other);
distances.push(dist);
sum += dist;
if (node.Node != other.Node) {
var dist = distance(node, other);
distances.push(dist);
sum += dist;
}
});
distances.sort();
}