class AdventOfCode2021::Day19::RotatingMatrix

Overview

Matrix for ro>tation

Defined in:

day19/rotating_matrix.cr

Constant Summary

SIZE = 3

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(m : Array(Int32)) #

[View source]
def self.new #

[View source]
def self.new(&) #

[View source]

Class Method Detail

def self.all_rotations #

[View source]
def self.multiplicative_identity #

[View source]
def self.t0 #

[View source]
def self.tx #

[View source]
def self.ty #

[View source]
def self.tz #

[View source]

Instance Method Detail

def *(other : RotatingMatrix) : RotatingMatrix #

[View source]
def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


[View source]
def ==(other) #
Description copied from class Reference

Returns false (other can only be a Value here).


[View source]
def [](x : Int32, y : Int32) #

[View source]
def []=(x : Int32, y : Int32, value : Int32) #

[View source]
def m : Array(Int32) #

The numbers represents the columns,

The 9 numbers in a row: m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2] represents the matrix as : [ m[0][0], m[1][0], m[2][0]] [ m[0][1], m[1][1], m[2][2]] [ m[0][2], m[1][2], m[2][3]]


[View source]
def m=(m : Array(Int32)) #

The numbers represents the columns,

The 9 numbers in a row: m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2] represents the matrix as : [ m[0][0], m[1][0], m[2][0]] [ m[0][1], m[1][1], m[2][2]] [ m[0][2], m[1][2], m[2][3]]


[View source]
def pow(n : Int32) : RotatingMatrix #

[View source]
def to_s(io) #

[View source]