eigen,gpuMatrix-method {gpuR}R Documentation

gpuMatrix Eigen Decomposition

Description

Computes the eigenvalues and eigenvectors for gpuMatrix objects.

Usage

## S4 method for signature 'gpuMatrix'
eigen(x, symmetric, only.values = FALSE, EISPACK = FALSE)

## S4 method for signature 'vclMatrix'
eigen(x, symmetric, only.values = FALSE, EISPACK = FALSE)

Arguments

x

A gpuMatrix object

symmetric

logical indication if matrix is assumed to be symmetric. If not specified or FALSE, the matrix is inspected for symmetry

only.values

if TRUE, returns only eigenvalues (internals still currently calculate both regardless)

EISPACK

logical. Defunct and ignored

Details

This function currently implements the qr_method function from the ViennaCL library. As such, non-symmetric matrices are not supported given that OpenCL does not have a 'complex' data type.

Neither the eigenvalues nor the eigenvectors are sorted as done in the base R eigen method.

Value

values

A gpuVector containing the unsorted eigenvalues of x.

vectors

A gpuMatrix containing the unsorted eigenvectors of x

Note

The sign's may be different on some of the eigenvector elements. As noted in the base eigen documentation:

Recall that the eigenvectors are only defined up to a constant: even when the length is specified they are still only defined up to a scalar of modulus one (the sign for real matrices).

Therefore, although the signs may be different, the results are functionally equivalent


[Package gpuR version 2.0.6 Index]