mikera / vectorz-clj

Fast matrix and vector maths library for Clojure - as a core.matrix implementation
202 stars 19 forks source link

Bug in Cholesky #29

Closed mikera closed 10 years ago

mikera commented 10 years ago

Cholesky decomposition seems to produce odd results where it should return nil, e.g.:

(cholesky (matrix :vectorz [[1 2] [2 1]]))
=> {:L* #<Matrix22 [[1.0,2.0],[0.0,NaN]]>, :L #<Matrix22 [[1.0,0.0],[2.0,NaN]]>}
mikera commented 10 years ago

@prasant94 one for you to take a look at? I think this should be returning nil whenever the matrix is not positive semi-definite

prasant94 commented 10 years ago

yes, I am aware of this. We are still using the SimpleCholesky implementation in vectorz. This should go away once we switch to the new implementation.

mikera commented 10 years ago

OK cool. Good to switch over as soon as we can, I think? Or modify the SimpleCholesky to be smarter and detect these cases?

prasant94 commented 10 years ago

This has been done. Closing it