Type:
Class
Constants:
SELECTORS : {all: true, diagonal: true, off_diagonal: true, lower: true, strict_lower: true, strict_upper: true, upper: true}.freeze

The Matrix class represents a mathematical matrix. It provides methods for creating matrices, operating on them arithmetically and algebraically, and determining their mathematical properties (trace, rank, inverse, determinant).

Method Catalogue

To create a matrix:

To access Matrix elements/columns/rows/submatrices/properties:

Properties of a matrix:

Matrix arithmetic:

Matrix functions:

Matrix decompositions:

Complex arithmetic:

  • conj

  • conjugate

  • imag

  • imaginary

  • real

  • rect

  • rectangular

Conversion to other data types:

String representations:

trace

trace() Instance Public methods Returns the trace (sum of diagonal elements)

2015-04-18 10:41:58
lower_triangular?

lower_triangular?() Instance Public methods Returns true is this

2015-04-18 08:41:13
unit

unit(n) Class Public methods Alias for:

2015-04-18 05:50:11
permutation?

permutation?() Instance Public methods Returns true is this is

2015-04-18 09:12:10
index

index(value, selector = :all) â [row, column]index(selector = :all){ block } â [row, column]index(selector = :all) â an_enumerator

2015-04-18 08:20:08
row_size

row_size() Instance Public methods Alias for:

2015-04-18 09:57:05
+

+(m) Instance Public methods Matrix

2015-04-18 05:58:43
component

component(i, j) Instance Public methods Alias for:

2015-04-18 06:46:38
each_with_index

each_with_index(which = :all) Instance Public methods Same as

2015-04-18 07:16:50
eigensystem

eigensystem() Instance Public methods Returns the Eigensystem of the matrix;

2015-04-18 07:24:23