class SimpleMatrix(T)
- SimpleMatrix(T)
- Reference
- Object
Defined in:
simple_matrix/apply.crsimple_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
- .new(height : Int, width : Int, value : T = T.new(0))
- .new(pull : JSON::PullParser)
- .new(height : Int, width : Int, &)
- .new(buffer : Array(Array(T)))
Class Method Summary
Instance Method Summary
- #==(other : SimpleMatrix) : Bool
- #==(other_buffer : Array(Array(T))) : Bool
- #apply(result_matrix : SimpleMatrix(T), &block : T, Int32, Int32 -> T) : Void
- #apply(result_buffer : Array(Array(T)), &block : T, Int32, Int32 -> T) : Void
- #buffer
- #convolve(window : SimpleMatrix(T), result_matrix : SimpleMatrix(T), padding : NamedTuple(x: UInt8, y: UInt8) = {x: 0_u8, y: 0_u8}) : Void
- #convolve(window_buffer : Array(Array(T)), result_buffer : Array(Array(T)), padding : NamedTuple(x: UInt8, y: UInt8) = {x: 0_u8, y: 0_u8}) : Void
- #dot(other_matrix : SimpleMatrix(T), result_matrix : SimpleMatrix(T)) : Void
- #dot(other_buffer : Array(Array(T)), result_buffer : Array(Array(T))) : Void
- #each(&block : T -> Void) : Void
- #each_with_index(&block : T, Int32, Int32 -> Void) : Void
- #height
- #map!(&block : T, Int32, Int32 -> Void) : Void
- #mul(other_matrix : SimpleMatrix(T), result_matrix : SimpleMatrix(T)) : Void
- #mul(other_buffer : Array(Array(T)), result_buffer : Array(Array(T))) : Void
- #mul(value : Number, result_matrix : SimpleMatrix(T)) : Void
- #mul(value : Number, result_buffer : Array(Array(T))) : Void
- #size : UInt32
- #sum(other_matrix : SimpleMatrix(T), result_matrix : SimpleMatrix(T)) : Void
- #sum(other_buffer : Array(Array(T)), result_buffer : Array(Array(T))) : Void
- #sum(value : Number, result_matrix : SimpleMatrix(T)) : Void
- #sum(value : Number, result_buffer : Array(Array(T))) : Void
- #to_json(json : JSON::Builder) : Void
-
#to_s(io : IO) : Void
Appends a short String representation of this object which includes its class name and its object address.
- #transpose(result_matrix : SimpleMatrix(T)) : Void
- #transpose(result_buffer : Array(Array(T))) : Void
- #width
Constructor Detail
Class Method Detail
Instance Method Detail
def convolve(window : SimpleMatrix(T), result_matrix : SimpleMatrix(T), padding : NamedTuple(x: UInt8, y: UInt8) = {x: 0_u8, y: 0_u8}) : Void
#
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
#
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>