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:

each

each(which = :all) Instance Public methods Yields all elements of the matrix

2015-04-18 07:15:45
to_s

to_s() Instance Public methods Overrides

2015-04-18 10:33:19
regular?

regular?() Instance Public methods Returns true if this is a regular

2015-04-18 09:42:36
transpose

transpose() Instance Public methods Returns the transpose of the matrix.

2015-04-18 10:45:28
minor

minor(*param) Instance Public methods Returns a section of the matrix. The

2015-04-18 09:01:19
collect

collect() Instance Public methods Returns a matrix that is the result of iteration

2015-04-18 06:36:35
imaginary

imaginary() Instance Public methods Returns the imaginary part of the matrix

2015-04-18 08:13:16
/ 2

/(other) Instance Public methods

2015-04-18 06:06:04
lup

lup() Instance Public methods Returns the LUP decomposition of the matrix; see

2015-04-18 08:48:14
rank

rank() Instance Public methods Returns the rank of the matrix. Beware that using

2015-04-18 09:13:50