diag,vclMatrix-method {gpuR}R Documentation

gpuR Matrix Diagonals

Description

Extract or replace the diagonal of a matrix

Usage

## S4 method for signature 'vclMatrix'
diag(x)

## S4 replacement method for signature 'vclMatrix,vclVector'
diag(x) <- value

## S4 method for signature 'gpuMatrix'
diag(x)

## S4 replacement method for signature 'gpuMatrix,gpuVector'
diag(x) <- value

Arguments

x

A gpuR matrix object

value

A vector object (gpuR)

Value

A gpuRvector object of the matrix diagonal of x. The replacement form returns nothing as it replaces the diagonal of x.

Note

If an identity matrix is desired, please see identity_matrix.

Author(s)

Charles Determan Jr.

See Also

identity_matrix


[Package gpuR version 2.0.6 Index]