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:

collect

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

2015-04-18 06:36:35
**

**(other) Instance Public methods

2015-04-18 05:56:48
/ 2

/(other) Instance Public methods

2015-04-18 06:06:04
imag

imag() Instance Public methods Alias for:

2015-04-18 08:08:25
to_s

to_s() Instance Public methods Overrides

2015-04-18 10:33:19
each

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

2015-04-18 07:15:45
diagonal

diagonal(*values) Class Public methods Creates a matrix where the diagonal elements

2015-04-18 05:20:56
rank_e

rank_e() Instance Public methods deprecated; use

2015-04-18 09:18:33
rectangular

rectangular() Instance Public methods Alias for:

2015-04-18 09:40:14
transpose

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

2015-04-18 10:45:28