relativeError method

double relativeError(
  1. Matrix2 correct
)

Returns relative error between this and correct

Implementation

double relativeError(Matrix2 correct) {
  final Matrix2 diff = correct - this;
  final double correctNorm = correct.infinityNorm();
  final double diffNorm = diff.infinityNorm();
  return diffNorm / correctNorm;
}