Ish::Matrix(T)
Inherits Reference < Object
Constructors
new(m : Int, n : Int, value : T)
Creates a m x n matrix with each element initialized as value.
new(m : Int, n : Int, &)
Creates an m x n matrix, yielding indicies for each element to provide an initial value.
Instance methods
[](i : Int, j : Int) : T
Retrieves the value of the element at i,j.
Indicies are zero-based. Negative values may be passed for i and j to
enable reverse indexing such that self[-1, -1] == self[m - 1, n - 1]
(same behaviour as arrays).
update(i, j, &block : T -> T)
Yields the current element at i,j and updates the value with the block's return value.