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

Issue with lu solver #1445

Open
Makogan opened this issue Oct 10, 2024 · 0 comments
Open

Issue with lu solver #1445

Makogan opened this issue Oct 10, 2024 · 0 comments

Comments

@Makogan
Copy link

Makogan commented Oct 10, 2024

I think there's a gotcha situation in which the LU solver fails.

    let decomp = mat.lu();
    let res = decomp.solve(&b).expect(format!("{} {}", mat, b).as_str());

Consider the following linear system:

 ┌                                                                                 ┐
  │          -0           -120.864365                 0           1 │
  │           0           -120.864365                 0           1 │
  │   173502.55     -120.86603   45485.008        1 │
  │           1                            0                      0         0 │
  └                                                                                ┘

 
  ┌   ┐
  │ 0 │
  │ 0 │
  │ 0 │
  │ 0 │
  └   ┘

Since the matrix has a repeated row, there are classes of inputs for which a solution does not exist. However, since it is asking for $b=0$, there is at least one trivial solution of x=0;

I don't know if this is something that wants to be taken into account but I will mention it just in case.

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