Perform LU decomposition # Parameters - `input` is the input matrix # Return Values A triplet of Arrays. The first Array will contain the lower triangular matrix of the LU decomposition. The second Array will contain the lower triangular matrix of the LU decomposition. The third Array will contain the permutation indices to map the input to the decomposition.
(input: &Array<T>)
| 148 | /// |
| 149 | /// The third Array will contain the permutation indices to map the input to the decomposition. |
| 150 | pub fn lu<T>(input: &Array<T>) -> (Array<T>, Array<T>, Array<i32>) |
| 151 | where |
| 152 | T: HasAfEnum + FloatingPoint, |
| 153 | { |
| 154 | unsafe { |
| 155 | let mut lower: af_array = std::ptr::null_mut(); |
| 156 | let mut upper: af_array = std::ptr::null_mut(); |
| 157 | let mut pivot: af_array = std::ptr::null_mut(); |
| 158 | let err_val = af_lu( |
| 159 | &mut lower as *mut af_array, |
| 160 | &mut upper as *mut af_array, |
| 161 | &mut pivot as *mut af_array, |
| 162 | input.get(), |
| 163 | ); |
| 164 | HANDLE_ERROR(AfError::from(err_val)); |
| 165 | (lower.into(), upper.into(), pivot.into()) |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | /// Perform inplace LU decomposition |
| 170 | /// |
nothing calls this directly
no test coverage detected