I have a program that uses and needs to be checked, a matrix can be reversed let me know Is that I can only try and catch the exception, but it seems that a bad idea ("normal" code seems bad when blocking a call as part of the path).
A test returns the inverse (or better than the inverse o) operation.
In general, if you can not solve the matrix, then it's a singular (non-inventable ) is. I believe that the way Java does this, he tries to solve the matrix using LU factorization, and if it fails, then it gives "true" to "single".
Actually not a normal way to look at the elements of a matrix and determine whether it is singular - you need to look at each column, whether it is orthogonal with others (i.e. matrix For nullspace is 0). LU factorization happens very fast, usually ... there are times where it takes the bulk of an operation.
Do you have a real speed problem that you are trying to overcome?
Comments
Post a Comment