From e3d1bf6f92d1bb2ad8ad66aa4e2d4b04066dd600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sat, 12 Jul 2014 09:30:49 +0200 Subject: [PATCH] Update to the last rust-nightly. Version of rustc: 0.11.0-nightly (5ad7286dc37839b7234ff51aab172e48935869d8 2014-07-12 00:31:46 +0000) --- Makefile | 3 +-- src/lib.rs | 2 +- src/linalg/decompositions.rs | 8 ++++---- src/structs/dmat.rs | 2 +- src/structs/spec/mat.rs | 8 ++++---- src/structs/spec/vec.rs | 4 ++-- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 698ee0b8..b670ff54 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,7 @@ nalgebra_lib_path=lib nalgebra_doc_path=doc all: mkdir -p $(nalgebra_lib_path) - rustc src/lib.rs --out-dir $(nalgebra_lib_path) --opt-level 3 - rustc src/lib.rs --out-dir $(nalgebra_lib_path) --crate-type dylib --opt-level 3 + rustc src/lib.rs --out-dir $(nalgebra_lib_path) --crate-type dylib --crate-type rlib --opt-level 3 test: mkdir -p $(nalgebra_lib_path) diff --git a/src/lib.rs b/src/lib.rs index ba5b4d65..942166d2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -96,7 +96,7 @@ Feel free to add your project to this list if you happen to use **nalgebra**! * [frog](https://github.com/natal/frog): a machine learning library. */ -#![crate_id = "nalgebra#0.1"] +#![crate_name = "nalgebra"] #![crate_type = "lib"] #![deny(non_camel_case_types)] #![deny(unnecessary_parens)] diff --git a/src/linalg/decompositions.rs b/src/linalg/decompositions.rs index 969d265b..f666866e 100644 --- a/src/linalg/decompositions.rs +++ b/src/linalg/decompositions.rs @@ -5,16 +5,16 @@ use traits::geometry::Norm; use std::cmp::min; /// Get the householder matrix corresponding to a reflexion to the hyperplane -/// defined by `vec̀ . It can be a reflexion contained in a subspace. +/// defined by `vec`. It can be a reflexion contained in a subspace. /// /// # Arguments /// * `dim` - the dimension of the space the resulting matrix operates in /// * `start` - the starting dimension of the subspace of the reflexion /// * `vec` - the vector defining the reflection. pub fn householder_matrix, - V: Indexable> - (dim: uint, start: uint, vec: V) -> M { + M: Eye + Indexable<(uint, uint), N>, + V: Indexable> + (dim: uint, start: uint, vec: V) -> M { let mut qk : M = Eye::new_identity(dim); let stop = start + vec.shape(); assert!(stop <= dim); diff --git a/src/structs/dmat.rs b/src/structs/dmat.rs index 8233384b..91d4df74 100644 --- a/src/structs/dmat.rs +++ b/src/structs/dmat.rs @@ -491,7 +491,7 @@ impl + Clone> Mean> for DMat { } } -impl + DMatDivRhs> + ToStr > Cov> for DMat { +impl + DMatDivRhs>> Cov> for DMat { // FIXME: this could be heavily optimized, removing all temporaries by merging loops. fn cov(m: &DMat) -> DMat { assert!(m.nrows > 1); diff --git a/src/structs/spec/mat.rs b/src/structs/spec/mat.rs index e44c2e06..c99cb9f5 100644 --- a/src/structs/spec/mat.rs +++ b/src/structs/spec/mat.rs @@ -122,7 +122,7 @@ impl Row> for Mat3 { 0 => Vec3::new(self.m11.clone(), self.m12.clone(), self.m13.clone()), 1 => Vec3::new(self.m21.clone(), self.m22.clone(), self.m23.clone()), 2 => Vec3::new(self.m31.clone(), self.m32.clone(), self.m33.clone()), - _ => fail!("Index out of range: 3d matrices do not have {} rows.", i.to_str()) + _ => fail!(format!("Index out of range: 3d matrices do not have {} rows.", i)) } } @@ -144,7 +144,7 @@ impl Row> for Mat3 { self.m32 = r.y.clone(); self.m33 = r.z; }, - _ => fail!("Index out of range: 3d matrices do not have {} rows.", i.to_str()) + _ => fail!(format!("Index out of range: 3d matrices do not have {} rows.", i)) } } @@ -162,7 +162,7 @@ impl Col> for Mat3 { 0 => Vec3::new(self.m11.clone(), self.m21.clone(), self.m31.clone()), 1 => Vec3::new(self.m12.clone(), self.m22.clone(), self.m32.clone()), 2 => Vec3::new(self.m13.clone(), self.m23.clone(), self.m33.clone()), - _ => fail!("Index out of range: 3d matrices do not have {} cols.", i.to_str() ) + _ => fail!(format!("Index out of range: 3d matrices do not have {} cols.", i)) } } @@ -184,7 +184,7 @@ impl Col> for Mat3 { self.m23 = r.y.clone(); self.m33 = r.z; }, - _ => fail!("Index out of range: 3d matrices do not have {} cols.", i.to_str() ) + _ => fail!(format!("Index out of range: 3d matrices do not have {} cols.", i)) } } diff --git a/src/structs/spec/vec.rs b/src/structs/spec/vec.rs index 2e44b8b1..a4e94c65 100644 --- a/src/structs/spec/vec.rs +++ b/src/structs/spec/vec.rs @@ -53,7 +53,7 @@ impl Row> for Vec2 { match i { 0 => Vec1::new(self.x.clone()), 1 => Vec1::new(self.y.clone()), - _ => fail!("Index out of range: 2d vectors do not have {} rows. ", i.to_str()) + _ => fail!(format!("Index out of range: 2d vectors do not have {} rows. ", i)) } } @@ -62,7 +62,7 @@ impl Row> for Vec2 { match i { 0 => self.x = r.x, 1 => self.y = r.x, - _ => fail!("Index out of range: 2d vectors do not have {} rows.", i.to_str()) + _ => fail!(format!("Index out of range: 2d vectors do not have {} rows.", i)) } }