Matrix Blocks

Share:

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

1
2
3
4
5
6
7
8
9
block(object, rowStart, rowEnd, colStart, colEnd)

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

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

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

Details

This function allows a user to create a gpuR matrix object that references a continous 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.

Value

A gpuMatrixBlock or vclMatrixBlock object

Author(s)

Charles Determan Jr.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.