SquareEuclidean() public static method

Gets the Squared Euclidean norm for a matrix.
public static SquareEuclidean ( this a ) : double
a this
return double
コード例 #1
0
ファイル: Norm.Generated.cs プロジェクト: sujitzzz/framework
        /// <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);
        }
コード例 #2
0
ファイル: Norm.Generated.cs プロジェクト: sujitzzz/framework
        /// <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);
        }
コード例 #3
0
        /// <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);
        }