abstract struct
PF2d::Matrix(T, W, H)
- PF2d::Matrix(T, W, H)
- Struct
- Value
- Object
Included Modules
- Indexable::Mutable(T)
Direct Known Subclasses
Defined in:
pf2d/matrix.crpf2d/matrix/solve.cr
Constructors
Macro Summary
- [](*args)
-
define(width, height)
Define a maxtrix with a given width and height:
crystal Matrix.define(3, 3) # => produces the PF2d::Mat3x3(T) struct constant -
define_mul(w)
This allows matrix multiplication for this matrix by another of w width
crystal PF2d::Matrix.define(3, 3) # => PF2d::Mat3x3(T) PF2d::Mat3x3.define_mul(3) # Only define this once PF2d::Mat3x3[...] * PF2d::Mat3x3[...] # => Mat3x3
Instance Method Summary
- #==(other : self)
- #[](row : Int, col : Int)
- #[]=(row : Int, col : Int, value : T)
- #fill(*args, **options)
- #fill(*args, **options, &)
- #height
- #initialize
- #size(*args, **options)
- #size(*args, **options, &)
-
#solve?
Gaussian elimination https://www.geeksforgeeks.org/dsa/gaussian-elimination/
- #swap_cols(c1, c2)
- #swap_rows(r1, r2)
- #to_s(io)
- #unsafe_fetch(*args, **options)
- #unsafe_fetch(*args, **options, &)
- #unsafe_put(*args, **options)
- #unsafe_put(*args, **options, &)
- #width
Constructor Detail
Macro Detail
macro define(width, height)
#
Define a maxtrix with a given width and height:
Matrix.define(3, 3) # => produces the PF2d::Mat3x3(T) struct constant
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