/// <summary> /// Gets the Euclidean norm for a matrix. /// </summary> /// public static double[] Euclidean(this Sparse <double>[] a, int dimension) { var norm = Norm.SquareEuclidean(a, dimension); for (int i = 0; i < norm.Length; i++) { norm[i] = (double)System.Math.Sqrt(norm[i]); } return(norm); }
/// <summary> /// Gets the Euclidean norm for a matrix. /// </summary> /// public static float[] Euclidean(this float[][] a, int dimension) { var norm = Norm.SquareEuclidean(a, dimension); for (int i = 0; i < norm.Length; i++) { norm[i] = (float)System.Math.Sqrt(norm[i]); } return(norm); }
/// <summary> /// Gets the Euclidean norm for a matrix. /// </summary> /// public static double[] Euclidean(this double[,] a, int dimension) { double[] norm = Norm.SquareEuclidean(a, dimension); for (int i = 0; i < norm.Length; i++) { norm[i] = System.Math.Sqrt(norm[i]); } return(norm); }