Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cholesky(::Diagonal), with tests. (JuliaLang#27823)
* Add cholesky(::Diagonal), with tests. * Wrap value in Cholesky, fix tests, include order. * Move diagonal.jl include near the other types (cosmetic). * Handle check=false, add complex w/tests, move include back. 1. Code is moved to diagonal.jl, this looked like the simplest solution to have all types available for functions. 2. Added case for `check = false`, which does not fail if the diagonal value is ≤ 0, but records it in `info`. 3. Allow for complex values, only check for `== 0`. 4. Unit tests for `check = false`, also for complex case. * Fix deprecated syntax in tests. * Add cholesky!(::Diagonal), generalize tests for positive definiteness. 1. Control flow is simplified by using a loop. 2. Allow for the possibility of types other than Real or Complex (eg Quaternion). 3. Add tests `InexactError` for some `cholesky!(::Diagonal{Int})`. * Fix missing default.
- Loading branch information