Copy double precision DX to double precision DY. For I = 0 to N-1, copy DX(LX+I*INCX) to DY(LY+I*INCY), where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is defined in a similar way using INCY.

dcopy(N = NULL, X, INCX = 1, Y, INCY = 1)

Arguments

N

number of elements in input vector(s)

X

double precision vector with N elements

INCX

storage spacing between elements of DX

Y

double precision vector with N elements

INCY

storage spacing between elements of DY

Value

DY copy of vector DX (unchanged if N .LE. 0)

References

C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T. Krogh, Basic linear algebra subprograms for Fortran usage, Algorithm No. 539, Transactions on Mathematical Software 5, 3 (September 1979), pp. 308-323.

Examples

if (FALSE) { set.seed(4669) A = big.matrix(3, 2, type="double", init=1, dimnames=list(NULL, c("alpha", "beta")), shared=FALSE) B = big.matrix(3, 2, type="double", init=0, dimnames=list(NULL, c("alpha", "beta")), shared=FALSE) dcopy(X=A,Y=B) A[,]-B[,] # The big.matrix file backings will be deleted when garbage collected. rm(A,B) gc() }