Esempio n. 1
0
 /// <summary>
 /// Calculates the average of the specified vector.
 /// </summary>
 /// <param name="arr">The array whose average is being calculated.</param>
 /// <returns>The average of the array.</returns>
 public static double Average(this double[] arr)
 {
     return(VectorUtilities.Avg(arr));
 }
Esempio n. 2
0
 /// <summary>
 /// Calculates the average of the specified matrix, column-wise.
 /// </summary>
 /// <param name="m">The matrix whose average is being calculated.</param>
 /// <returns>The average value of the matrix, per column.</returns>
 public static double[] Average(this double[][] m)
 {
     return(VectorUtilities.Avg(m));
 }