struct LA::Utils::Rows(T)

Overview

Indexable(SubMatrix(T)) that allows iterating over rows

Included Modules

Defined in:

matrix/iteration.cr:31
matrix/iteration.cr:60

Instance Method Summary

Instance methods inherited from module Enumerable(LA::SubMatrix(T))

product(initial : Complex)
product(initial : Complex, &)
product

Instance Method Detail

def [](range : Range) #

Returns SubMatrix that consist of given rows

Example:

m = GMat32.new([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]])
m.rows[1..2].should eq m[1..2, 0..3]

[View source]