fn gram_schmidt(v: &[[f64; 3]; 3]) -> ([[f64; 3]; 3], [[f64; 3]; 3]) {
        let mut u = [[0f64; 3]; 3];
        let mut mu = [[0f64; 3]; 3];
        u[0] = [v[0][0], v[0][1], v[0][2]];
        mu[1][0] = utils::vdot(v[1], u[0]) / utils::vdot(u[0], u[0]);
        for i in 0..3 {
            u[1][i] = v[1][i] - (mu[1][0] * u[0][i]);
        }
        mu[2][0] = utils::vdot(v[2], u[0]) / utils::vdot(u[0], u[0]);
        mu[2][1] = utils::vdot(v[2], u[1]) / utils::vdot(u[1], u[1]);
        for i in 0..3 {
            u[2][i] = v[2][i] - (mu[2][0] * u[0][i]) - (mu[2][1] * u[1][i]);
        }
        (u, mu)
    }
/// Calculates the Gram-Schmidt co-effecients for the lll-reduction.
Calculates the Gram-Schmidt co-effecients for the lll-reduction.
Calculates the Gram - Schmidt co - effecients for the lll - reduction .
fn gram_schmidt(v: &[[f64; 3]; 3]) -> ([[f64; 3]; 3], [[f64; 3]; 3]) {
        let mut u = [[0f64; 3]; 3];
        let mut mu = [[0f64; 3]; 3];
        u[0] = [v[0][0], v[0][1], v[0][2]];
        mu[1][0] = utils::vdot(v[1], u[0]) / utils::vdot(u[0], u[0]);
        for i in 0..3 {
            u[1][i] = v[1][i] - (mu[1][0] * u[0][i]);
        }
        mu[2][0] = utils::vdot(v[2], u[0]) / utils::vdot(u[0], u[0]);
        mu[2][1] = utils::vdot(v[2], u[1]) / utils::vdot(u[1], u[1]);
        for i in 0..3 {
            u[2][i] = v[2][i] - (mu[2][0] * u[0][i]) - (mu[2][1] * u[1][i]);
        }
        (u, mu)
    }
fn gram_schmidt ( v : & [ [ f64 ; 3 ] ; 3 ] ) -> ( [ [ f64 ; 3 ] ; 3 ] , [ [ f64 ; 3 ] ; 3 ] ) { let mut u = [ [ 0f64 ; 3 ] ; 3 ] ; let mut mu = [ [ 0f64 ; 3 ] ; 3 ] ; u [ 0 ] = [ v [ 0 ] [ 0 ] , v [ 0 ] [ 1 ] , v [ 0 ] [ 2 ] ] ; mu [ 1 ] [ 0 ] = utils :: vdot ( v [ 1 ] , u [ 0 ] ) / utils :: vdot ( u [ 0 ] , u [ 0 ] ) ; for i in 0 .. 3 { u [ 1 ] [ i ] = v [ 1 ] [ i ] - ( mu [ 1 ] [ 0 ] * u [ 0 ] [ i ] ) ; } mu [ 2 ] [ 0 ] = utils :: vdot ( v [ 2 ] , u [ 0 ] ) / utils :: vdot ( u [ 0 ] , u [ 0 ] ) ; mu [ 2 ] [ 1 ] = utils :: vdot ( v [ 2 ] , u [ 1 ] ) / utils :: vdot ( u [ 1 ] , u [ 1 ] ) ; for i in 0 .. 3 { u [ 2 ] [ i ] = v [ 2 ] [ i ] - ( mu [ 2 ] [ 0 ] * u [ 0 ] [ i ] ) - ( mu [ 2 ] [ 1 ] * u [ 1 ] [ i ] ) ; } ( u , mu ) }
Calculates the Gram-Schmidt co-effecients for the lll-reduction.
Calculates the Gram - Schmidt co - effecients for the lll - reduction .
v
&[[f64; 3]; 3]
v
&[[f64; 3]; 3]