MatrixExtend::Matrix(T)
Inherits Reference < Object
TODO : use StaticArray with Pointers
Constructors
from(data : Array(Array(T))) : self
Sourceidentity(lines, columns) : self
Sourcenew(lines : Int32, columns : Int32, &)
Sourcenew(lines : Int32, columns : Int32, default : T = T.new(0))
Sourcenew(lines : Int32, columns : Int32, data : Array(Array(T)))
SourceInstance methods
*(right : Matrix(T)) : typeof(self)
Source*(right : Number::Primitive) : typeof(self)
Source+(right : typeof(self)) : typeof(self)
Source==(matrix : Matrix)
Source[](y : Int32, x : Int32)
Source[](y : Int32)
Source[]=(y : Int32, x : Int32, v : T)
Source[]=(y : Int32, v : Array(T))
Sourceclone
Sourcecolumns
Sourcecolumns=(columns : Int32)
Sourcedata
Sourcedata=(data : Array(Array(T)))
Sourceeach_column
Sourceeach_column
Sourceeach_line
Sourceeach_line
Sourceflatten
Sourceflatten_map!
Sourcelines
Sourcelines=(lines : Int32)
Sourceset_column(idx : Int32, v : Array(T))
Sourceset_line(idx : Int32, v : Array(T))
Sourceto_a
Sourceto_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO) which can be overridden for custom implementations.
Also see #inspect.
transpose
Source