dscal: Scales a vector by a constant.

View source: R/bigalgebra.R

dscalR Documentation

Scales a vector by a constant.

Description

Scales a vector by a constant.

Usage

dscal(N = NULL, ALPHA, Y, INCY = 1)

Arguments

N

an integer. Number of elements in input vector(s)

ALPHA

a real number. The scalar alpha

Y

a big matrix to scale by ALPHA

INCY

an integer. Storage spacing between elements of Y.

Value

Update Y.

Examples

## Not run: 
set.seed(4669)
A = big.matrix(3, 2, type="double", init=1, dimnames=list(NULL, 
c("alpha", "beta")), shared=FALSE)
dscal(ALPHA=2,Y=A)
A[,]

# The big.matrix file backings will be deleted when garbage collected.
rm(A)
gc()

## End(Not run)

bigalgebra documentation built on Sept. 30, 2024, 9:42 a.m.