class MatrixExtend::Matrix(T)

Overview

TODO : use StaticArray with Pointers

Defined in:

matrix_extend/matrix.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from(data : Array(Array(T))) : self #

[View source]
def self.identity(lines, columns) : self #

[View source]
def self.new(lines : Int32, columns : Int32, &) #

[View source]
def self.new(lines : Int32, columns : Int32, default : T = T.new(0)) #

[View source]
def self.new(lines : Int32, columns : Int32, data : Array(Array(T))) #

[View source]

Instance Method Detail

def *(right : Matrix(T)) : typeof(self) #

[View source]
def *(right : Number::Primitive) : typeof(self) #

[View source]
def +(right : typeof(self)) : typeof(self) #

[View source]
def ==(matrix : Matrix) #

[View source]
def [](y : Int32, x : Int32) #

[View source]
def [](y : Int32) #

[View source]
def []=(y : Int32, x : Int32, v : T) #

[View source]
def []=(y : Int32, v : Array(T)) #

[View source]
def clone #

[View source]
def columns : Int32 #

[View source]
def columns=(columns : Int32) #

[View source]
def data : Array(Array(T)) #

[View source]
def data=(data : Array(Array(T))) #

[View source]
def each_column(&) #

[View source]
def each_column : Array(Array(T)) #

[View source]
def each_line(&) #

[View source]
def each_line : Array(Array(T)) #

[View source]
def flatten : Array(T) #

[View source]
def flatten_map!(&) : typeof(self) #

[View source]
def lines : Int32 #

[View source]
def lines=(lines : Int32) #

[View source]
def set_column(idx : Int32, v : Array(T)) #

[View source]
def set_line(idx : Int32, v : Array(T)) #

[View source]
def t #

[View source]
def to_a : Array(Array(T)) #

[View source]
def to_s #
Description copied from class Object

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.


[View source]
def transpose : typeof(self) #

[View source]