Function engram::metrics::norm_l1

source ·
pub fn norm_l1(vector: &[f64]) -> f64
Expand description

Compute the L1 norm (Manhattan distance) of a vector.

§Examples

let x = [1.0, 2.0, 3.0];
let n = norm_l1(&x);