use crate::algebra::abstr::{Complex, Real, Scalar};
use crate::algebra::linear::matrix::choleskydec::CholeskyDecomposition;
use crate::algebra::linear::matrix::{CholeskyDec, Diagonal};
impl CholeskyDecomposition<f64> for Diagonal<f64> {
fn dec_cholesky(&self) -> Result<CholeskyDec<f64>, String> {
self.matrix.dec_cholesky()
}
}
impl<T> CholeskyDecomposition<Complex<T>> for Diagonal<Complex<T>>
where
T: Real,
Complex<T>: Scalar,
{
fn dec_cholesky(&self) -> Result<CholeskyDec<Complex<T>>, String> {
self.matrix.dec_cholesky()
}
}