pub fn euclidian_distance_n_d(pt1: Vec<f64>, pt2: Vec<f64>) -> f64 {
    let num_dimensions = pt1.len();
    let mut sum = 0.0;
    for dimension in 0..num_dimensions {
        let temp = pt2[dimension] - pt1[dimension];
        sum = sum + (temp * temp);
    }
    let distance = sum.sqrt();
    distance
}
/// Computes the Euclidian distance between two multidimensional points.
/// Points must have the same dimensionality.
Computes the Euclidian distance between two multidimensional points.
Points must have the same dimensionality.
Computes the Euclidian distance between two multidimensional points . Points must have the same dimensionality .
pub fn euclidian_distance_n_d(pt1: Vec<f64>, pt2: Vec<f64>) -> f64 {
    let num_dimensions = pt1.len();
    let mut sum = 0.0;
    for dimension in 0..num_dimensions {
        let temp = pt2[dimension] - pt1[dimension];
        sum = sum + (temp * temp);
    }
    let distance = sum.sqrt();
    distance
}
pub fn euclidian_distance_n_d ( pt1 : Vec < f64 > , pt2 : Vec < f64 > ) -> f64 { let num_dimensions = pt1 . len ( ) ; let mut sum = 0.0 ; for dimension in 0 .. num_dimensions { let temp = pt2 [ dimension ] - pt1 [ dimension ] ; sum = sum + ( temp * temp ) ; } let distance = sum . sqrt ( ) ; distance }
Computes the Euclidian distance between two multidimensional points.
Computes the Euclidian distance between two multidimensional points .
pt1
Vec<f64>
pt2
Vec<f64>