Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUP decomposition seems to violate API #71

Open
vincechoo750 opened this issue Nov 28, 2019 · 0 comments
Open

LUP decomposition seems to violate API #71

vincechoo750 opened this issue Nov 28, 2019 · 0 comments

Comments

@vincechoo750
Copy link

vincechoo750 commented Nov 28, 2019

The API for LUP decomposition seems to indicate that

(defn LU-contract [A]
 (let [{:keys [L U P]} (lu A)]
  (= (mmul P A) (mmul L U))))

should return true.

When the implementation is vectorz, such as the case of

    [[ 1 -2  3]]
A =  [ 2 -5  12]
     [ 0  2 -10]]

it is not the case that (LU-contract A) returns true.

Instead, it appears to be the case that (= (mmul A) (mmul P L U)).

Not sure if this is a typo in the API docs or in the code itself - the tests in the tests folder seem to indicate that (= (mmul A) (mmul P L U)) is the intended behavior.

@vincechoo750 vincechoo750 changed the title LUP decomposition seems to violate API Bug? - LUP decomposition seems to violate API Nov 28, 2019
@vincechoo750 vincechoo750 changed the title Bug? - LUP decomposition seems to violate API LUP decomposition seems to violate API Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant