abstract struct PF2d::Matrix(T, W, H)

Included Modules

Direct Known Subclasses

Defined in:

pf2d/matrix.cr
pf2d/matrix/solve.cr

Constructors

Macro Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Macro Detail

macro [](*args) #

[View source]
macro define(width, height) #

Define a maxtrix with a given width and height:

  Matrix.define(3, 3) # => produces the PF2d::Mat3x3(T) struct constant

[View source]
macro define_mul(w) #

This allows matrix multiplication for this matrix by another of w width

  PF2d::Matrix.define(3, 3) # => PF2d::Mat3x3(T)
  PF2d::Mat3x3.define_mul(3) # Only define this once
  PF2d::Mat3x3[...] * PF2d::Mat3x3[...] # => Mat3x3

[View source]

Instance Method Detail

def ==(other : self) #

[View source]
def [](row : Int, col : Int) #

[View source]
def []=(row : Int, col : Int, value : T) #

[View source]
def fill(*args, **options) #

[View source]
def fill(*args, **options, &) #

[View source]
def height #

[View source]
def initialize #

[View source]
def size(*args, **options) #

[View source]
def size(*args, **options, &) #

[View source]
def solve? #

Gaussian elimination https://www.geeksforgeeks.org/dsa/gaussian-elimination/


[View source]
def swap_cols(c1, c2) #

[View source]
def swap_rows(r1, r2) #

[View source]
def to_s(io) #

[View source]
def unsafe_fetch(*args, **options) #

[View source]
def unsafe_fetch(*args, **options, &) #

[View source]
def unsafe_put(*args, **options) #

[View source]
def unsafe_put(*args, **options, &) #

[View source]
def width #

[View source]