I don't think that is correct. It is not the case that there was some element in the input that was too small. For instance, this matrix is positive definite:
3 -3 1 2 4 2 1 1 30 While this one is not 3 -3 1 2 3 2 1 1 30 The value of the diagonal that triggers the error message will be some negative number that does not appear in the original matrix. For a non-pivoting Cholesky, I think that the message should be more like "Input was not positive definite". For a pivoting rank-revealing Cholesky, I think that the result should by "Input was not semi-positive definite" or "Input was positive semi-definite but had rank {}" depending on the three way test. The exceptions thrown should not be sub-classes of NumberIsTooSmallException because it is a matrix that is the problem and matrices are not numbers and do not have a total order. On Fri, Sep 9, 2011 at 4:39 AM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > > "Non-positive definiteness in input detected at diagonal element number > xxx" > > What do you think of the following message? > > <element value> is smaller than, or equal to, the minimum (<threshold > value>): > not positive definite matrix: value <element value> at index <element > index> > > where, in actual messages, the <...> will be the numeric values of course. > > "NonPositiveDefiniteMatrixException" would inherit from > "NumberIsTooSmallException". The rationale being that it exactly matches > the > test and that it is meaningless to report an element of the original > matrix, > as you've explained. > > > [...] > > Gilles > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > >