Update to the last rust-nightly.
Version of rustc: 0.11.0-nightly (5ad7286dc37839b7234ff51aab172e48935869d8 2014-07-12 00:31:46 +0000)
This commit is contained in:
parent
7b9a3f2bb9
commit
e3d1bf6f92
3
Makefile
3
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)
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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<N: Float,
|
||||
M: Eye + Indexable<(uint, uint), N>,
|
||||
V: Indexable<uint, N>>
|
||||
(dim: uint, start: uint, vec: V) -> M {
|
||||
M: Eye + Indexable<(uint, uint), N>,
|
||||
V: Indexable<uint, N>>
|
||||
(dim: uint, start: uint, vec: V) -> M {
|
||||
let mut qk : M = Eye::new_identity(dim);
|
||||
let stop = start + vec.shape();
|
||||
assert!(stop <= dim);
|
||||
|
|
|
@ -491,7 +491,7 @@ impl<N: Num + Cast<f32> + Clone> Mean<DVec<N>> for DMat<N> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<N: Clone + Num + Cast<f32> + DMatDivRhs<N, DMat<N>> + ToStr > Cov<DMat<N>> for DMat<N> {
|
||||
impl<N: Clone + Num + Cast<f32> + DMatDivRhs<N, DMat<N>>> Cov<DMat<N>> for DMat<N> {
|
||||
// FIXME: this could be heavily optimized, removing all temporaries by merging loops.
|
||||
fn cov(m: &DMat<N>) -> DMat<N> {
|
||||
assert!(m.nrows > 1);
|
||||
|
|
|
@ -122,7 +122,7 @@ impl<N: Clone> Row<Vec3<N>> for Mat3<N> {
|
|||
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<N: Clone> Row<Vec3<N>> for Mat3<N> {
|
|||
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<N: Clone> Col<Vec3<N>> for Mat3<N> {
|
|||
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<N: Clone> Col<Vec3<N>> for Mat3<N> {
|
|||
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))
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ impl<N: Clone> Row<Vec1<N>> for Vec2<N> {
|
|||
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<N: Clone> Row<Vec1<N>> for Vec2<N> {
|
|||
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))
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue