Style fixes.
This commit is contained in:
parent
ccaea63906
commit
37f1a1d26c
|
@ -1,7 +1,7 @@
|
|||
use traits::operations::{Transpose, ApproxEq};
|
||||
use traits::structure::{ColSlice, Eye, Indexable, Diag, SquareMat, BaseFloat, Cast};
|
||||
use traits::geometry::Norm;
|
||||
use std::cmp::min;
|
||||
use std::cmp;
|
||||
use std::ops::{Mul, Add, Sub};
|
||||
|
||||
/// Get the householder matrix corresponding to a reflexion to the hyperplane
|
||||
|
@ -22,8 +22,8 @@ pub fn householder_matrix<N, V, M>(dim: usize, start: usize, vec: V) -> M
|
|||
|
||||
assert!(dim >= stop);
|
||||
|
||||
for j in (start .. stop) {
|
||||
for i in (start .. stop) {
|
||||
for j in start .. stop {
|
||||
for i in start .. stop {
|
||||
unsafe {
|
||||
let vv = vec.unsafe_at(i - start) * vec.unsafe_at(j - start);
|
||||
let qkij = qk.unsafe_at((i, j));
|
||||
|
@ -48,7 +48,7 @@ pub fn qr<N, V, M>(m: &M) -> (M, M)
|
|||
let mut q : M = Eye::new_identity(rows);
|
||||
let mut r = *m;
|
||||
|
||||
for ite in 0..min(rows - 1, cols) {
|
||||
for ite in 0 .. cmp::min(rows - 1, cols) {
|
||||
let mut v = r.col_slice(ite, ite, rows);
|
||||
let alpha =
|
||||
if unsafe { v.unsafe_at(ite) } >= ::zero() {
|
||||
|
|
Loading…
Reference in New Issue