diff --git a/nalgebra-lapack/Cargo.toml b/nalgebra-lapack/Cargo.toml index 95153a2cc..ef9bea2b7 100644 --- a/nalgebra-lapack/Cargo.toml +++ b/nalgebra-lapack/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "nalgebra-lapack" +name = "nalgebra-lapack" version = "0.24.0" -authors = [ "Sébastien Crozet ", "Andrew Straw " ] +authors = ["Sébastien Crozet ", "Andrew Straw "] -description = "Matrix decompositions using nalgebra matrices and Lapack bindings." +description = "Matrix decompositions using nalgebra matrices and Lapack bindings." documentation = "https://www.nalgebra.org/docs" homepage = "https://nalgebra.org" repository = "https://github.com/dimforge/nalgebra" readme = "../README.md" -categories = [ "science", "mathematics" ] -keywords = [ "linear", "algebra", "matrix", "vector", "lapack" ] +categories = ["science", "mathematics"] +keywords = ["linear", "algebra", "matrix", "vector", "lapack"] license = "MIT" edition = "2018" @@ -17,31 +17,31 @@ edition = "2018" maintenance = { status = "actively-developed" } [features] -serde-serialize = [ "serde", "nalgebra/serde-serialize" ] -proptest-support = [ "nalgebra/proptest-support" ] -arbitrary = [ "nalgebra/arbitrary" ] +serde-serialize = ["serde", "nalgebra/serde-serialize"] +proptest-support = ["nalgebra/proptest-support"] +arbitrary = ["nalgebra/arbitrary"] # For BLAS/LAPACK -default = ["netlib"] -openblas = ["lapack-src/openblas"] -netlib = ["lapack-src/netlib"] +default = ["openblas"] +openblas = ["lapack-src/openblas"] +netlib = ["lapack-src/netlib"] accelerate = ["lapack-src/accelerate"] -intel-mkl = ["lapack-src/intel-mkl"] +intel-mkl = ["lapack-src/intel-mkl"] [dependencies] -nalgebra = { version = "0.32", path = ".." } -num-traits = "0.2" -num-complex = { version = "0.4", default-features = false } -simba = "0.8" -serde = { version = "1.0", features = [ "derive" ], optional = true } -lapack = { version = "0.19", default-features = false } -lapack-src = { version = "0.8", default-features = false } +nalgebra = { version = "0.32", path = ".." } +num-traits = "0.2" +num-complex = { version = "0.4", default-features = false } +simba = "0.8" +serde = { version = "1.0", features = ["derive"], optional = true } +lapack = { version = "0.19", default-features = false } +lapack-src = { version = "0.8", default-features = false } # clippy = "*" [dev-dependencies] -nalgebra = { version = "0.32", features = [ "arbitrary", "rand" ], path = ".." } -proptest = { version = "1", default-features = false, features = ["std"] } +nalgebra = { version = "0.32", features = ["arbitrary", "rand"], path = ".." } +proptest = { version = "1", default-features = false, features = ["std"] } quickcheck = "1" -approx = "0.5" -rand = "0.8" +approx = "0.5" +rand = "0.8" diff --git a/nalgebra-lapack/src/generalized_eigenvalues.rs b/nalgebra-lapack/src/generalized_eigenvalues.rs index 94a87c234..33312868f 100644 --- a/nalgebra-lapack/src/generalized_eigenvalues.rs +++ b/nalgebra-lapack/src/generalized_eigenvalues.rs @@ -158,8 +158,7 @@ where /// as columns. pub fn eigenvectors(&self) -> (OMatrix, D, D>, OMatrix, D, D>) where - DefaultAllocator: - Allocator, D, D> + Allocator, D> + Allocator<(Complex, T), D>, + DefaultAllocator: Allocator + Allocator, { /* How the eigenvectors are built up: @@ -226,7 +225,7 @@ where #[must_use] pub fn raw_eigenvalues(&self) -> OVector<(Complex, T), D> where - DefaultAllocator: Allocator<(Complex, T), D>, + DefaultAllocator: Allocator, { let mut out = Matrix::from_element_generic( self.vsl.shape_generic().0, diff --git a/nalgebra-lapack/src/lu.rs b/nalgebra-lapack/src/lu.rs index e2d6ac00c..e3d944079 100644 --- a/nalgebra-lapack/src/lu.rs +++ b/nalgebra-lapack/src/lu.rs @@ -21,21 +21,21 @@ use lapack; #[cfg_attr( feature = "serde-serialize", serde(bound(serialize = "DefaultAllocator: Allocator + - Allocator>, + Allocator>, OMatrix: Serialize, PermutationSequence>: Serialize")) )] #[cfg_attr( feature = "serde-serialize", serde(bound(deserialize = "DefaultAllocator: Allocator + - Allocator>, + Allocator>, OMatrix: Deserialize<'de>, PermutationSequence>: Deserialize<'de>")) )] #[derive(Clone, Debug)] pub struct LU, C: Dim> where - DefaultAllocator: Allocator> + Allocator, + DefaultAllocator: Allocator> + Allocator, { lu: OMatrix, p: OVector>, @@ -43,7 +43,7 @@ where impl, C: Dim> Copy for LU where - DefaultAllocator: Allocator + Allocator>, + DefaultAllocator: Allocator + Allocator>, OMatrix: Copy, OVector>: Copy, { diff --git a/nalgebra-lapack/src/schur.rs b/nalgebra-lapack/src/schur.rs index c921694c8..1cc486f9b 100644 --- a/nalgebra-lapack/src/schur.rs +++ b/nalgebra-lapack/src/schur.rs @@ -146,7 +146,7 @@ where #[must_use] pub fn complex_eigenvalues(&self) -> OVector, D> where - DefaultAllocator: Allocator, D>, + DefaultAllocator: Allocator, { let mut out = Matrix::zeros_generic(self.t.shape_generic().0, Const::<1>); diff --git a/nalgebra-lapack/src/svd.rs b/nalgebra-lapack/src/svd.rs index a4e37d322..b9c249182 100644 --- a/nalgebra-lapack/src/svd.rs +++ b/nalgebra-lapack/src/svd.rs @@ -56,10 +56,8 @@ where /// supported by the Singular Value Decompotition. pub trait SVDScalar, C: Dim>: Scalar where - DefaultAllocator: Allocator - + Allocator - + Allocator> - + Allocator, + DefaultAllocator: + Allocator + Allocator + Allocator> + Allocator, { /// Computes the SVD decomposition of `m`. fn compute(m: OMatrix) -> Option>; @@ -80,10 +78,10 @@ macro_rules! svd_impl( ($t: ty, $lapack_func: path) => ( impl SVDScalar for $t where R: DimMin, - DefaultAllocator: Allocator<$t, R, C> + - Allocator<$t, R, R> + - Allocator<$t, C, C> + - Allocator<$t, DimMinimum> { + DefaultAllocator: Allocator + + Allocator + + Allocator + + Allocator> { fn compute(mut m: OMatrix<$t, R, C>) -> Option> { let (nrows, ncols) = m.shape_generic(); @@ -132,16 +130,16 @@ macro_rules! svd_impl( impl, C: Dim> SVD<$t, R, C> // TODO: All those bounds… - where DefaultAllocator: Allocator<$t, R, C> + - Allocator<$t, C, R> + - Allocator<$t, U1, R> + - Allocator<$t, U1, C> + - Allocator<$t, R, R> + - Allocator<$t, DimMinimum> + - Allocator<$t, DimMinimum, R> + - Allocator<$t, DimMinimum, C> + - Allocator<$t, R, DimMinimum> + - Allocator<$t, C, C> { + where DefaultAllocator: Allocator + + Allocator + + Allocator + + Allocator + + Allocator + + Allocator> + + Allocator, R> + + Allocator, C> + + Allocator> + + Allocator { /// Reconstructs the matrix from its decomposition. /// /// Useful if some components (e.g. some singular values) of this decomposition have