Skip to content

Commit

Permalink
Manual cleanup of graph2distmat.js
Browse files Browse the repository at this point in the history
  • Loading branch information
curran committed Jan 2, 2021
1 parent fb737ea commit 815c7fc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/graph2distmat.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ export function distmat2valuemat(distmat) {
const n = distmat.length;
const valuemat = zeroes(n, n);
const max_dist = distmax(distmat);
let i;
let j;

for (i = 0; i < n; i++) {
for (j = i; j < n; j++) {
for (let i = 0; i < n; i++) {
for (let j = i; j < n; j++) {
valuemat[j][i] = valuemat[i][j] = 1 + max_dist - distmat[i][j];
}
}
Expand Down

0 comments on commit 815c7fc

Please sign in to comment.