Skip to contents

matrixZeroBasedView is a class that allows elemental matrix access using zero-based indeces.

Methods


Method new()

Initialize (lifecycle: maturing)

Usage

Arguments

x

matrix or Matrix::sparseMatrix or Matrix::Matrix


Method take()

Zero-based matrix element access

Usage

matrixZeroBasedView$take(i = NULL, j = NULL)

Arguments

i

Row index (zero-based).

j

Column index (zero-based).

Returns

The specified matrix slice as another matrixZeroBasedView


Method dim()

dim

Usage

matrixZeroBasedView$dim()

Returns

The dimensions of the matrix.


Method nrow()

nrow

Usage

matrixZeroBasedView$nrow()

Returns

Matrix row count.


Method ncol()

ncol

Usage

matrixZeroBasedView$ncol()

Returns

Matrix column count.


Method get_one_based_matrix()

Get the one-based R matrix with its original class

Usage

matrixZeroBasedView$get_one_based_matrix()

Returns

One-based matrix


Method sum()

Perform arithmetic sum between this matrixZeroBasedView and another matrixZeroBasedView.

Usage

matrixZeroBasedView$sum(x)

Arguments

x

the matrixZeroBasedView to sum.

Returns

The result of the sum as a matrixZeroBasedView.


Method print()

print

Usage

matrixZeroBasedView$print()


Method clone()

The objects of this class are cloneable with this method.

Usage

matrixZeroBasedView$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.