diff --git a/nalgebra-lapack/src/cholesky.rs b/nalgebra-lapack/src/cholesky.rs index 02552915..2014da76 100644 --- a/nalgebra-lapack/src/cholesky.rs +++ b/nalgebra-lapack/src/cholesky.rs @@ -28,13 +28,13 @@ use lapack; )) )] #[derive(Clone, Debug)] -pub struct Cholesky +pub struct Cholesky where DefaultAllocator: Allocator { l: MatrixN, } -impl Copy for Cholesky +impl Copy for Cholesky where DefaultAllocator: Allocator, MatrixN: Copy, @@ -175,7 +175,7 @@ where DefaultAllocator: Allocator */ /// Trait implemented by floats (`f32`, `f64`) and complex floats (`Complex`, `Complex`) /// supported by the cholesky decomposition. -pub trait CholeskyScalar: Scalar { +pub trait CholeskyScalar: Scalar + Copy { #[allow(missing_docs)] fn xpotrf(uplo: u8, n: i32, a: &mut [Self], lda: i32, info: &mut i32); #[allow(missing_docs)] diff --git a/nalgebra-lapack/src/eigen.rs b/nalgebra-lapack/src/eigen.rs index d5397841..0db48fc1 100644 --- a/nalgebra-lapack/src/eigen.rs +++ b/nalgebra-lapack/src/eigen.rs @@ -33,7 +33,7 @@ use lapack; )) )] #[derive(Clone, Debug)] -pub struct Eigen +pub struct Eigen where DefaultAllocator: Allocator + Allocator { /// The eigenvalues of the decomposed matrix. @@ -44,7 +44,7 @@ where DefaultAllocator: Allocator + Allocator pub left_eigenvectors: Option>, } -impl Copy for Eigen +impl Copy for Eigen where DefaultAllocator: Allocator + Allocator, VectorN: Copy, @@ -311,7 +311,7 @@ where DefaultAllocator: Allocator + Allocator */ /// Trait implemented by scalar type for which Lapack function exist to compute the /// eigendecomposition. -pub trait EigenScalar: Scalar { +pub trait EigenScalar: Scalar + Copy { #[allow(missing_docs)] fn xgeev( jobvl: u8, diff --git a/nalgebra-lapack/src/hessenberg.rs b/nalgebra-lapack/src/hessenberg.rs index c9f8d282..8048bfcc 100644 --- a/nalgebra-lapack/src/hessenberg.rs +++ b/nalgebra-lapack/src/hessenberg.rs @@ -30,14 +30,14 @@ use lapack; )) )] #[derive(Clone, Debug)] -pub struct Hessenberg> +pub struct Hessenberg> where DefaultAllocator: Allocator + Allocator> { h: MatrixN, tau: VectorN>, } -impl> Copy for Hessenberg +impl> Copy for Hessenberg where DefaultAllocator: Allocator + Allocator>, MatrixN: Copy, @@ -137,7 +137,7 @@ where DefaultAllocator: Allocator + Allocator> * Lapack functions dispatch. * */ -pub trait HessenbergScalar: Scalar { +pub trait HessenbergScalar: Scalar + Copy { fn xgehrd( n: i32, ilo: i32, diff --git a/nalgebra-lapack/src/lu.rs b/nalgebra-lapack/src/lu.rs index ada9bb34..b087aea7 100644 --- a/nalgebra-lapack/src/lu.rs +++ b/nalgebra-lapack/src/lu.rs @@ -37,14 +37,14 @@ use lapack; )) )] #[derive(Clone, Debug)] -pub struct LU, C: Dim> +pub struct LU, C: Dim> where DefaultAllocator: Allocator> + Allocator { lu: MatrixMN, p: VectorN>, } -impl, C: Dim> Copy for LU +impl, C: Dim> Copy for LU where DefaultAllocator: Allocator + Allocator>, MatrixMN: Copy, @@ -306,7 +306,7 @@ where * */ /// Trait implemented by scalars for which Lapack implements the LU decomposition. -pub trait LUScalar: Scalar { +pub trait LUScalar: Scalar + Copy { #[allow(missing_docs)] fn xgetrf(m: i32, n: i32, a: &mut [Self], lda: i32, ipiv: &mut [i32], info: &mut i32); #[allow(missing_docs)] diff --git a/nalgebra-lapack/src/qr.rs b/nalgebra-lapack/src/qr.rs index 5d4b3108..58a040d5 100644 --- a/nalgebra-lapack/src/qr.rs +++ b/nalgebra-lapack/src/qr.rs @@ -33,14 +33,14 @@ use lapack; )) )] #[derive(Clone, Debug)] -pub struct QR, C: Dim> +pub struct QR, C: Dim> where DefaultAllocator: Allocator + Allocator> { qr: MatrixMN, tau: VectorN>, } -impl, C: Dim> Copy for QR +impl, C: Dim> Copy for QR where DefaultAllocator: Allocator + Allocator>, MatrixMN: Copy, @@ -166,7 +166,7 @@ where DefaultAllocator: Allocator */ /// Trait implemented by scalar types for which Lapack function exist to compute the /// QR decomposition. -pub trait QRScalar: Scalar { +pub trait QRScalar: Scalar + Copy { fn xgeqrf( m: i32, n: i32, diff --git a/nalgebra-lapack/src/schur.rs b/nalgebra-lapack/src/schur.rs index eb618fe9..e61a22ea 100644 --- a/nalgebra-lapack/src/schur.rs +++ b/nalgebra-lapack/src/schur.rs @@ -33,7 +33,7 @@ use lapack; )) )] #[derive(Clone, Debug)] -pub struct Schur +pub struct Schur where DefaultAllocator: Allocator + Allocator { re: VectorN, @@ -42,7 +42,7 @@ where DefaultAllocator: Allocator + Allocator q: MatrixN, } -impl Copy for Schur +impl Copy for Schur where DefaultAllocator: Allocator + Allocator, MatrixN: Copy, @@ -162,7 +162,7 @@ where DefaultAllocator: Allocator + Allocator * */ /// Trait implemented by scalars for which Lapack implements the RealField Schur decomposition. -pub trait SchurScalar: Scalar { +pub trait SchurScalar: Scalar + Copy { #[allow(missing_docs)] fn xgees( jobvs: u8, diff --git a/nalgebra-lapack/src/svd.rs b/nalgebra-lapack/src/svd.rs index 9363fced..1cd0d24b 100644 --- a/nalgebra-lapack/src/svd.rs +++ b/nalgebra-lapack/src/svd.rs @@ -36,7 +36,7 @@ use lapack; )) )] #[derive(Clone, Debug)] -pub struct SVD, C: Dim> +pub struct SVD, C: Dim> where DefaultAllocator: Allocator + Allocator> + Allocator { /// The left-singular vectors `U` of this SVD. @@ -47,7 +47,7 @@ where DefaultAllocator: Allocator + Allocator> + Al pub singular_values: VectorN>, } -impl, C: Dim> Copy for SVD +impl, C: Dim> Copy for SVD where DefaultAllocator: Allocator + Allocator + Allocator>, MatrixMN: Copy, @@ -57,7 +57,7 @@ where /// Trait implemented by floats (`f32`, `f64`) and complex floats (`Complex`, `Complex`) /// supported by the Singular Value Decompotition. -pub trait SVDScalar, C: Dim>: Scalar +pub trait SVDScalar, C: Dim>: Scalar + Copy where DefaultAllocator: Allocator + Allocator + Allocator> diff --git a/nalgebra-lapack/src/symmetric_eigen.rs b/nalgebra-lapack/src/symmetric_eigen.rs index d34b3fce..d50ee805 100644 --- a/nalgebra-lapack/src/symmetric_eigen.rs +++ b/nalgebra-lapack/src/symmetric_eigen.rs @@ -35,7 +35,7 @@ use lapack; )) )] #[derive(Clone, Debug)] -pub struct SymmetricEigen +pub struct SymmetricEigen where DefaultAllocator: Allocator + Allocator { /// The eigenvectors of the decomposed matrix. @@ -45,7 +45,7 @@ where DefaultAllocator: Allocator + Allocator pub eigenvalues: VectorN, } -impl Copy for SymmetricEigen +impl Copy for SymmetricEigen where DefaultAllocator: Allocator + Allocator, MatrixN: Copy, @@ -169,7 +169,7 @@ where DefaultAllocator: Allocator + Allocator */ /// Trait implemented by scalars for which Lapack implements the eigendecomposition of symmetric /// real matrices. -pub trait SymmetricEigenScalar: Scalar { +pub trait SymmetricEigenScalar: Scalar + Copy { #[allow(missing_docs)] fn xsyev( jobz: u8,