Ejemplo n.º 1
0
 public static RealType[] Abs <RealType>(IAlgebraReal <RealType> algebra, IList <RealType> list_0)
 {
     RealType[] result = new RealType[list_0.Count];
     Parallel.For(0, result.Length, index =>
     {
         result[index] = algebra.Abs(list_0[index]);
     });
     return(result);
 }
Ejemplo n.º 2
0
 public static RealType[] AbsoluteDifference <RealType>(IAlgebraReal <RealType> algebra, IList <RealType> list_0, IList <RealType> list_1)
 {
     if (list_0.Count != list_1.Count)
     {
         throw new Exception("Sizes do not match");
     }
     RealType[] result = new RealType[list_0.Count];
     Parallel.For(0, result.Length, index =>
     {
         result[index] = algebra.Abs(algebra.Subtract(list_0[index], list_1[index]));
     });
     return(result);
 }