normalize

Function normalize 

Source
pub fn normalize(a: &mut Matrix)
Expand description

Calculates the Euclidian (square root) norm of the provided matrix a

ยงExamples

use matrix_mc::{matrix, normalize};
 
let mut matrix = matrix![
    1, 3, 2;
    0, 0, 1;
    0, 4, 2
];
 
let result = matrix![
    1, 3./5., 2./3.; 
    0,     0, 1./3.;
    0, 4./5., 2./3.
];
 
normalize(&mut matrix);
 
assert_eq!(matrix, result);