Issue with lu solver
- Dominant language
- Rust
- Stars
- 4.8k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
I think there's a gotcha situation in which the LU solver fails.
```rs
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.