numl.Math.LinearAlgebra.Matrix.Min C# (CSharp) Method

Min() public static method

Determines the minimum of the given parameters.
public static Min ( Matrix source ) : double
source Matrix Source for the.
return double
        public static double Min(Matrix source)
        {
            double min = double.MaxValue;
            for (int i = 0; i < source.Rows; i++)
                for (int j = 0; j < source.Cols; j++)
                    if (source[i, j] < min)
                        min = source[i, j];

            return min;
        }

Same methods

Matrix::Min ( Matrix source, VectorType t = VectorType.Col ) : Vector

Usage Example

Beispiel #1
0
 /// <summary>
 /// Summarizes a given Matrix.
 /// </summary>
 /// <param name="matrix">Matrix to summarize.</param>
 /// <param name="byVector">Indicates which direction to summarize, default is <see cref="VectorType.Row"/> indicating top-down.</param>
 /// <returns></returns>
 public static Summary Summarize(Matrix matrix, VectorType byVector = VectorType.Row)
 {
     return new Summary()
     {
         Average = matrix.Mean(byVector),
         StandardDeviation = matrix.StdDev(byVector),
         Minimum = matrix.Min(byVector),
         Maximum = matrix.Max(byVector),
         Median = matrix.Median(byVector)
     };
 }
All Usage Examples Of numl.Math.LinearAlgebra.Matrix::Min