Perform Singular Value Decomposition inplace This function factorizes a matrix A into two unitary matrices U and Vt, and a diagonal matrix S such that A = U∗S∗Vt If A has M rows and N columns, U is of the size M x M , V is of size N x N, and S is of size M x N # Parameters - `in` is the input/output matrix. This will contain random data after the function call is complete. # Return Values A
(input: &mut Array<T>)
| 113 | /// |
| 114 | /// The third Array is the output array containing V ^ H |
| 115 | pub fn svd_inplace<T>(input: &mut Array<T>) -> (Array<T>, Array<T::BaseType>, Array<T>) |
| 116 | where |
| 117 | T: HasAfEnum + FloatingPoint, |
| 118 | T::BaseType: HasAfEnum, |
| 119 | { |
| 120 | unsafe { |
| 121 | let mut u: af_array = std::ptr::null_mut(); |
| 122 | let mut s: af_array = std::ptr::null_mut(); |
| 123 | let mut vt: af_array = std::ptr::null_mut(); |
| 124 | let err_val = af_svd_inplace( |
| 125 | &mut u as *mut af_array, |
| 126 | &mut s as *mut af_array, |
| 127 | &mut vt as *mut af_array, |
| 128 | input.get(), |
| 129 | ); |
| 130 | HANDLE_ERROR(AfError::from(err_val)); |
| 131 | (u.into(), s.into(), vt.into()) |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | /// Perform LU decomposition |
| 136 | /// |
nothing calls this directly
no test coverage detected