adamaulia / efficient-java-matrix-library

Automatically exported from code.google.com/p/efficient-java-matrix-library
0 stars 0 forks source link

MatrixFeatures.isPositiveDefinite modifies the matrix if sandwiched with invert() #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
 m1 = new SimpleMatrix(..)
i1 = m1.invert();
MatrixFeatures.isPositiveDefinite(m1.getMatrix());
i2 = m1.invert

After this i1 != i2. 

Working code attached.

What is the expected output? What do you see instead?

I would expect that i1 == i2.

The attached code prints:

false
false
Type = dense , numRows = 2 , numCols = 2
 1.000  -2.000  
-0.000   1.000  

Type = dense , numRows = 2 , numCols = 2
-0.333   0.667  
 0.667  -0.333  

What version of the product are you using? On what operating system?

version of ejml: release 21 .
os: osx 10.7
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode) 

Please provide any additional information below.

Calling isPositiveDefinite with a copied densematrix solved the problem, still 
unexpected.

Original issue reported on code.google.com by bartha.p...@gmail.com on 3 Apr 2013 at 3:18

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the bug report.  Bug has been fixed already.   Will do another 
stable release soon so that this doesn't keep on getting reported.

Original comment by peter.ab...@gmail.com on 8 Apr 2013 at 8:43