Perform QR decomposition # Parameters - `input` is the input matrix # Return Values A triplet of Arrays. The first Array is the orthogonal matrix from QR decomposition The second Array is the upper triangular matrix from QR decomposition The third Array will contain additional information needed for solving a least squares problem using q and r
(input: &Array<T>)
| 206 | /// The third Array will contain additional information needed for solving a least squares problem |
| 207 | /// using q and r |
| 208 | pub fn qr<T>(input: &Array<T>) -> (Array<T>, Array<T>, Array<T>) |
| 209 | where |
| 210 | T: HasAfEnum + FloatingPoint, |
| 211 | { |
| 212 | unsafe { |
| 213 | let mut q: af_array = std::ptr::null_mut(); |
| 214 | let mut r: af_array = std::ptr::null_mut(); |
| 215 | let mut tau: af_array = std::ptr::null_mut(); |
| 216 | let err_val = af_qr( |
| 217 | &mut q as *mut af_array, |
| 218 | &mut r as *mut af_array, |
| 219 | &mut tau as *mut af_array, |
| 220 | input.get(), |
| 221 | ); |
| 222 | HANDLE_ERROR(AfError::from(err_val)); |
| 223 | (q.into(), r.into(), tau.into()) |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | /// Perform inplace QR decomposition |
| 228 | /// |
nothing calls this directly
no test coverage detected