UDU only supported for Real matrices, not Complex

Signed-off-by: Christopher Rabotin <christopher.rabotin@gmail.com>
This commit is contained in:
Christopher Rabotin 2020-10-28 16:04:46 -06:00 committed by Crozet Sébastien
parent 4ff4911ac3
commit 89ca2fe5fb

View File

@ -5,7 +5,7 @@ use crate::allocator::Allocator;
use crate::base::{DefaultAllocator, MatrixN, VectorN, U1}; use crate::base::{DefaultAllocator, MatrixN, VectorN, U1};
use crate::dimension::Dim; use crate::dimension::Dim;
use crate::storage::Storage; use crate::storage::Storage;
use simba::scalar::ComplexField; use simba::scalar::RealField;
/// UDU factorization /// UDU factorization
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
@ -20,7 +20,7 @@ use simba::scalar::ComplexField;
)) ))
)] )]
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct UDU<N: ComplexField, D: Dim> pub struct UDU<N: RealField, D: Dim>
where where
DefaultAllocator: Allocator<N, D> + Allocator<N, D, D>, DefaultAllocator: Allocator<N, D> + Allocator<N, D, D>,
{ {
@ -30,7 +30,7 @@ where
pub d: VectorN<N, D>, pub d: VectorN<N, D>,
} }
impl<N: ComplexField, D: Dim> Copy for UDU<N, D> impl<N: RealField, D: Dim> Copy for UDU<N, D>
where where
DefaultAllocator: Allocator<N, D> + Allocator<N, D, D>, DefaultAllocator: Allocator<N, D> + Allocator<N, D, D>,
VectorN<N, D>: Copy, VectorN<N, D>: Copy,
@ -38,7 +38,7 @@ where
{ {
} }
impl<N: ComplexField, D: Dim> UDU<N, D> impl<N: RealField, D: Dim> UDU<N, D>
where where
DefaultAllocator: Allocator<N, D> + Allocator<N, D, D>, DefaultAllocator: Allocator<N, D> + Allocator<N, D, D>,
{ {