class

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)
Source
new(nrows, ncolumns, capacity = 0)
Source
new(matrix : CSRMatrix(T))
Source
new(matrix : CSRMatrix)
Source
new(matrix : LA::Matrix)
Source

Instance methods

clear
Source
each_index(*, all = false, &)

def self.diag(nrows, ncolumns, values) TODO def self.diag(nrows, ncolumns, &block) TODO

Source
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 }

Source
map_with_index

Returns result of appliyng block to every element with index

Source
map_with_index!

Yields each element with index and replace it with returned value

Source
map_with_index_complex
Source
map_with_index_f64

TODO - macro magic?

Source
nonzeros
Source
unsafe_fetch(i, j)
Source
unsafe_set(i, j, value)
Source