示例#1
0
 /// <summary>
 /// Compute L1-norm. L1-norm computation doesn't subtract the mean from the source values.
 /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero).
 /// </summary>
 private static Float L1Norm(Float[] values, int count, Float mean = 0)
 {
     if (count == 0)
     {
         return(0);
     }
     return(SseUtils.SumAbs(mean, values, 0, count));
 }
 public static float SumAbs(float[] src, int offset, int count) => SseUtils.SumAbs(src, offset, count);