Skip to content

Commit

Permalink
fixed files form Math #77
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 34045a3 commit 43cd263
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ public double getL1Norm() {
public double getLInfNorm() {
double max = 0;
for (double a : data) {
max += Math.max(max, Math.abs(a));
max = Math.max(max, Math.abs(a));
}
return max;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,15 +495,6 @@ public double getL1Distance(double[] v) throws IllegalArgumentException {
return max;
}

public double getLInfNorm() {
double max = 0;
Iterator iter = entries.iterator();
while (iter.hasNext()) {
iter.advance();
max += iter.value();
}
return max;
}
/**
* Optimized method to compute LInfDistance.
* @param v The vector to compute from
Expand Down

0 comments on commit 43cd263

Please sign in to comment.