commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <>
Subject [Math] "NonPositiveDefiniteMatrixException" message and meaning
Date Thu, 08 Sep 2011 13:30:24 GMT

In revision 1166674, I've added an argument to that exception so that it can
print the value that failed the test.
However, I also wonder whether the message should not be
  not positive definite matrix: diagonal element at ({1},{1}) is not strictly larger than
{2} ({0})"
instead of the current
  not positive definite matrix: diagonal element at ({1},{1}) is smaller than {2} ({0})

In a class where the exceptionmay be thrown ("CholeskyDecompositionImpl"), the
test is (at line 128):
  ltI[i] < absolutePositivityThreshold
Which will *not* fail if "absolutePositivityThreshold" is zero.

Changing it to
  ltI[i] <= absolutePositivityThreshold
would allow to set the threshold to "0" exactly, for those cases where one
wants to avoid raising an exception (like where the matrix assumed to be
positive definite), but nevertheless wants to retain a basic fool-proof


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message