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); }
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); }