Пример #1
0
        public static matrix Copy(matrix a)
        {
            var r = new matrix(a.Rows, a.Cols);

            Blas.copy(a.Length, a.Array, 0, 1, r.Array, 0, 1);
            return(r);
        }
Пример #2
0
 public static Array <Real> Copy(this Array <Real> a, Array <Real> result = null)
 {
     if (a == result)
     {
         return(result);
     }
     if (result == null)
     {
         result = new Array <Real>(a.Shape);
     }
     Array_.ElementwiseOp(result, a, (n, x, offsetx, incx, y, offsety, incy) =>
     {
         Blas.copy(n, y, offsety, incy, x, offsetx, incx);
     });
     return(result);
 }