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

SolveH uses incorrect triangle #317

Open
jbncode opened this issue Jul 26, 2022 · 0 comments
Open

SolveH uses incorrect triangle #317

jbncode opened this issue Jul 26, 2022 · 0 comments

Comments

@jbncode
Copy link

jbncode commented Jul 26, 2022

The documentation for SolveH says "Note that only the upper triangular portion of the matrix is used.". However it actually uses the lower triangular portion. For example:

let a = array![[1.0, 3.0],
               [5.0, 2.0]];
let b = array![29.0, 30.0];
let x = a.solveh(&b).unwrap();
println!("solution = {x:.1}");

prints solution = [4.0, 5.0], which is using the 5.0 off-diagonal element rather than 3.0.

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