LA::Sparse::CSRMatrix(T)
Inherits LA::Sparse::Matrix / LA::Matrix / LA::LapackHelper / Enumerable / Reference / Object
Constructors
new(nrows, ncolumns, raw_rows : Array(Int32), raw_columns : Array(Int32), raw_values : Array(T), flags = MatrixFlags::None, *, dont_clone : Bool = false)
Sourcenew(nrows, ncolumns, capacity = 0)
Sourcenew(matrix : CSRMatrix(T))
Sourcenew(matrix : CSRMatrix)
Sourcenew(matrix : LA::Matrix)
SourceInstance methods
clear
Sourceeach_index(*, all = false, &)
def self.diag(nrows, ncolumns, values) TODO def self.diag(nrows, ncolumns, &block) TODO
each_with_index(*, all = false, &)
Yields every element of matrix with corresponding row and column
all argument controls whether to yield all or non-empty elements for banded\sparse matrices
Example:
m.each_with_index { |v, i, j| m2[i, j] = v }
map_with_index_complex
Sourcenonzeros
Sourceunsafe_fetch(i, j)
Sourceunsafe_set(i, j, value)
Source