struct

PF2d::Matrix(T, W, H)

Inherits Indexable::Mutable < Indexable < Enumerable < Iterable < Struct < Value < Object

Constructors

Instance methods

==(other : self)
Source
[](row : Int, col : Int)
Source
[]=(row : Int, col : Int, value : T)
Source
fill(*args, **options)
Source
fill(*args, **options, &)
Source
height
Source
initialize
Source
size(*args, **options)
Source
size(*args, **options, &)
Source
solve?

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

Source
swap_cols(c1, c2)
Source
swap_rows(r1, r2)
Source
to_s(io)
Source
unsafe_fetch(*args, **options)
Source
unsafe_fetch(*args, **options, &)
Source
unsafe_put(*args, **options)
Source
unsafe_put(*args, **options, &)
Source
width
Source

Macros

[](*args)
Source
define(width, height)

Define a maxtrix with a given width and height:

  Matrix.define(3, 3) # => produces the PF2d::Mat3x3(T) struct constant
Source
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
Source