class SimpleMatrix(T)

Defined in:

simple_matrix/apply.cr
simple_matrix/base.cr
simple_matrix/compare.cr
simple_matrix/convolve.cr
simple_matrix/dot.cr
simple_matrix/each_map.cr
simple_matrix/mul.cr
simple_matrix/sum.cr
simple_matrix/transpose.cr
version.cr

Constant Summary

VERSION = "1.0.0"

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(height : Int, width : Int, value : T = T.new(0)) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(height : Int, width : Int, &) #

[View source]
def self.new(buffer : Array(Array(T))) #

[View source]

Class Method Detail

def self.identity(diagonal_length : Int) : SimpleMatrix(T) #

[View source]

Instance Method Detail

def ==(other : SimpleMatrix) : Bool #

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

[View source]
def apply(result_matrix : SimpleMatrix(T), &block : T, Int32, Int32 -> T) : Void #

[View source]
def apply(result_buffer : Array(Array(T)), &block : T, Int32, Int32 -> T) : Void #

[View source]
def buffer #

[View source]
def convolve(window : SimpleMatrix(T), result_matrix : SimpleMatrix(T), padding : NamedTuple(x: UInt8, y: UInt8) = {x: 0_u8, y: 0_u8}) : Void #

[View source]
def convolve(window_buffer : Array(Array(T)), result_buffer : Array(Array(T)), padding : NamedTuple(x: UInt8, y: UInt8) = {x: 0_u8, y: 0_u8}) : Void #

[View source]
def dot(other_matrix : SimpleMatrix(T), result_matrix : SimpleMatrix(T)) : Void #

[View source]
def dot(other_buffer : Array(Array(T)), result_buffer : Array(Array(T))) : Void #

[View source]
def each(&block : T -> Void) : Void #

[View source]
def each_with_index(&block : T, Int32, Int32 -> Void) : Void #

[View source]
def height #

[View source]
def map!(&block : T, Int32, Int32 -> Void) : Void #

[View source]
def mul(other_matrix : SimpleMatrix(T), result_matrix : SimpleMatrix(T)) : Void #

[View source]
def mul(other_buffer : Array(Array(T)), result_buffer : Array(Array(T))) : Void #

[View source]
def mul(value : Number, result_matrix : SimpleMatrix(T)) : Void #

[View source]
def mul(value : Number, result_buffer : Array(Array(T))) : Void #

[View source]
def size : UInt32 #

[View source]
def sum(other_matrix : SimpleMatrix(T), result_matrix : SimpleMatrix(T)) : Void #

[View source]
def sum(other_buffer : Array(Array(T)), result_buffer : Array(Array(T))) : Void #

[View source]
def sum(value : Number, result_matrix : SimpleMatrix(T)) : Void #

[View source]
def sum(value : Number, result_buffer : Array(Array(T))) : Void #

[View source]
def to_json(json : JSON::Builder) : Void #

[View source]
def to_s(io : IO) : Void #
Description copied from class Reference

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>

[View source]
def transpose(result_matrix : SimpleMatrix(T)) : Void #

[View source]
def transpose(result_buffer : Array(Array(T))) : Void #

[View source]
def width #

[View source]