Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to the latest simba version. #761

Merged
merged 6 commits into from Aug 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Expand Up @@ -47,10 +47,10 @@ jobs:
- checkout
- run:
name: test
command: cargo test --all-features
command: cargo test --features arbitrary --features serde-serialize --features abomonation-serialize --features sparse --features debug --features io --features compare --features libm
- run:
name: test nalgebra-glm
command: cargo test -p nalgebra-glm --all-features
command: cargo test -p nalgebra-glm --features arbitrary --features serde-serialize --features abomonation-serialize --features sparse --features debug --features io --features compare --features libm
build-wasm:
executor: rust-executor
steps:
Expand Down
13 changes: 6 additions & 7 deletions Cargo.toml
Expand Up @@ -24,13 +24,16 @@ default = [ "std" ]
std = [ "matrixmultiply", "rand/std", "rand_distr", "simba/std" ]
stdweb = [ "rand/stdweb" ]
arbitrary = [ "quickcheck" ]
serde-serialize = [ "serde", "serde_derive", "num-complex/serde" ]
serde-serialize = [ "serde", "num-complex/serde" ]
abomonation-serialize = [ "abomonation" ]
sparse = [ ]
debug = [ "approx/num-complex", "rand/std" ]
alloc = [ ]
io = [ "pest", "pest_derive" ]
compare = [ "matrixcompare-core" ]
libm = [ "simba/libm" ]
libm-force = [ "simba/libm_force" ]


[dependencies]
typenum = "1.11"
Expand All @@ -40,12 +43,11 @@ num-traits = { version = "0.2", default-features = false }
num-complex = { version = "0.2", default-features = false }
num-rational = { version = "0.2", default-features = false }
approx = { version = "0.3", default-features = false }
simba = { version = "0.1", default-features = false }
simba = { version = "0.2", default-features = false }
alga = { version = "0.9", default-features = false, optional = true }
rand_distr = { version = "0.2", optional = true }
matrixmultiply = { version = "0.2", optional = true }
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", features = [ "derive" ], optional = true }
abomonation = { version = "0.7", optional = true }
mint = { version = "0.5", optional = true }
quickcheck = { version = "0.9", optional = true }
Expand Down Expand Up @@ -76,6 +78,3 @@ path = "benches/lib.rs"

[profile.bench]
lto = true

#[patch.crates-io]
#simba = { path = "../simba" }
2 changes: 1 addition & 1 deletion nalgebra-glm/Cargo.toml
Expand Up @@ -24,5 +24,5 @@ abomonation-serialize = [ "nalgebra/abomonation-serialize" ]
[dependencies]
num-traits = { version = "0.2", default-features = false }
approx = { version = "0.3", default-features = false }
simba = { version = "0.1", default-features = false }
simba = { version = "0.2", default-features = false }
nalgebra = { path = "..", version = "0.21", default-features = false }
2 changes: 1 addition & 1 deletion nalgebra-lapack/Cargo.toml
Expand Up @@ -26,7 +26,7 @@ intel-mkl = ["lapack-src/intel-mkl"]
nalgebra = { version = "0.21", path = ".." }
num-traits = "0.2"
num-complex = { version = "0.2", default-features = false }
simba = "0.1"
simba = "0.2"
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
lapack = { version = "0.16", default-features = false }
Expand Down
8 changes: 8 additions & 0 deletions src/base/construction.rs
Expand Up @@ -1011,6 +1011,14 @@ where
N: Scalar + Zero + One,
DefaultAllocator: Allocator<N, R>,
{
/// The column vector with `val` as its i-th component.
#[inline]
pub fn ith(i: usize, val: N) -> Self {
let mut res = Self::zeros();
res[i] = val;
res
}

/// The column vector with a 1 as its first component, and zero elsewhere.
#[inline]
pub fn x() -> Self
Expand Down
6 changes: 2 additions & 4 deletions src/lib.rs
Expand Up @@ -90,11 +90,9 @@ an optimized set of tools for computer graphics and physics. Those features incl
#[cfg(feature = "arbitrary")]
extern crate quickcheck;

#[cfg(feature = "serde")]
extern crate serde;
#[cfg(feature = "serde")]
#[cfg(feature = "serde-serialize")]
#[macro_use]
extern crate serde_derive;
extern crate serde;

#[cfg(feature = "abomonation-serialize")]
extern crate abomonation;
Expand Down
5 changes: 5 additions & 0 deletions src/linalg/mod.rs
Expand Up @@ -5,6 +5,10 @@ mod bidiagonal;
mod cholesky;
mod convolution;
mod determinant;
// FIXME: this should not be needed. However, the exp uses
// explicit float operations on `f32` and `f64`. We need to
// get rid of these to allow exp to be used on a no-std context.
#[cfg(feature = "std")]
mod exp;
mod full_piv_lu;
pub mod givens;
Expand All @@ -27,6 +31,7 @@ mod symmetric_tridiagonal;
pub use self::bidiagonal::*;
pub use self::cholesky::*;
pub use self::convolution::*;
#[cfg(feature = "std")]
pub use self::exp::*;
pub use self::full_piv_lu::*;
pub use self::hessenberg::*;
Expand Down