Solve with Vector # Solve options LU: Gaussian elimination with Complete pivoting LU (GECP) WAZ: Solve with WAZ decomposition
(&self, b: &[C64], sk: SolveKind)
| 2135 | /// * LU: Gaussian elimination with Complete pivoting LU (GECP) |
| 2136 | /// * WAZ: Solve with WAZ decomposition |
| 2137 | fn solve(&self, b: &[C64], sk: SolveKind) -> Vec<C64> { |
| 2138 | match sk { |
| 2139 | SolveKind::LU => { |
| 2140 | let lu = self.lu(); |
| 2141 | let (p, q, l, u) = lu.extract(); |
| 2142 | let mut v = b.to_vec(); |
| 2143 | v.swap_with_perm(&p.into_iter().enumerate().collect::<Vec<_>>()); |
| 2144 | let z = l.forward_subs(&v); |
| 2145 | let mut y = u.back_subs(&z); |
| 2146 | y.swap_with_perm(&q.into_iter().enumerate().rev().collect::<Vec<_>>()); |
| 2147 | y |
| 2148 | } |
| 2149 | SolveKind::WAZ => { |
| 2150 | unimplemented!() |
| 2151 | } |
| 2152 | } |
| 2153 | } |
| 2154 | |
| 2155 | fn solve_mat(&self, m: &ComplexMatrix, sk: SolveKind) -> ComplexMatrix { |
| 2156 | match sk { |
nothing calls this directly
no test coverage detected