class

LA::SubMatrix(T)

Inherits LA::Matrix / LA::LapackHelper / Enumerable / Reference / Object

it's like Slice, but for matrices. Lightweight class that stores only pointer to basic matrix, size and offset But allow all operations that allow Matrix(T)

Constructors

new(base : Matrix(T), offset : Tuple(Int32, Int32), size : RowColumn)

Creates submatrix from a given base, offset and size

Source

Instance methods

clone

Converts a submatrix to a GeneralMatrix(T)

Source
dup

Returns submatrix pointing to same area

Source
ncolumns

number of columns in submatrix

Source
nrows

number of rows in submatrix

Source
offset

index of a submatrix first row and column

Source