Learn R Programming

gpuR (version 2.0.6)

block: Matrix Blocks

Description

This doesn't create a copy, it provides a child class that points to a contiguous submatrix of a gpuMatrix or vclMatrix. Non-contiguous blocks are currently not supported.

Usage

block(object, rowStart, rowEnd, colStart, colEnd)

# S4 method for vclMatrix,integer,integer,integer,integer block(object, rowStart, rowEnd, colStart, colEnd)

# S4 method for gpuMatrix,integer,integer,integer,integer block(object, rowStart, rowEnd, colStart, colEnd)

Value

A block of the input gpuMatrixBlock or vclMatrixBlock object.

Arguments

object

A gpuMatrix or vclMatrix object

rowStart

An integer indicating the first row of block

rowEnd

An integer indicating the last row of block

colStart

An integer indicating the first column of block

colEnd

An integer indicating the last column of block

Author

Charles Determan Jr.

Details

This function allows a user to create a gpuR matrix object that references a continuous subset of columns and rows of another gpuR matrix object without a copy.

NOTE - this means that altering values in a matrix block object will alter values in the source matrix.