forked from M-Labs/nalgebra
fixing style issues
This commit is contained in:
parent
d1a58f960c
commit
a213a3da93
@ -8,8 +8,8 @@ use std::cmp::min;
|
|||||||
|
|
||||||
/// QR decomposition using Householder reflections
|
/// QR decomposition using Householder reflections
|
||||||
/// # Arguments
|
/// # Arguments
|
||||||
/// * `m` matrix to decompose
|
/// * `m` - matrix to decompose
|
||||||
pub fn decomp_qr<N: Clone + Num + Float>(m: &DMat<N>) -> (DMat<N>, DMat<N>) {
|
pub fn decomp_qr<N: Clone + Float>(m: &DMat<N>) -> (DMat<N>, DMat<N>) {
|
||||||
let rows = m.nrows();
|
let rows = m.nrows();
|
||||||
let cols = m.ncols();
|
let cols = m.ncols();
|
||||||
assert!(rows >= cols);
|
assert!(rows >= cols);
|
||||||
@ -36,7 +36,6 @@ pub fn decomp_qr<N: Clone + Num + Float>(m: &DMat<N>) -> (DMat<N>, DMat<N>) {
|
|||||||
|
|
||||||
for ite in range(0u, iterations) {
|
for ite in range(0u, iterations) {
|
||||||
let mut v = r.col_slice(ite, ite, rows);
|
let mut v = r.col_slice(ite, ite, rows);
|
||||||
//let mut v = r.col_slice<DVec<N>>(ite, rows-ite, rows);
|
|
||||||
let alpha =
|
let alpha =
|
||||||
if unsafe { v.at_fast(ite) } >= Zero::zero() {
|
if unsafe { v.at_fast(ite) } >= Zero::zero() {
|
||||||
-Norm::norm(&v)
|
-Norm::norm(&v)
|
||||||
|
Loading…
Reference in New Issue
Block a user