
=encoding utf8

=head1 NAME

Sidef::Types::Array::Matrix

=head1 DESCRIPTION

This class implements ...

=head1 SYNOPSIS

    var A = Matrix(
        [2, -3,  1],
        [1, -2, -2],
        [3, -4,  1],
    )

    var B = Matrix(
        [9, -3, -2],
        [3, -1,  7],
        [2, -4, -8],
    )

    say (A + B)     # matrix addition
    say (A - B)     # matrix subtraction
    say (A * B)     # matrix multiplication
    say (A / B)     # matrix division

    say (A + 42)    # matrix-scalar addition
    say (A - 42)    # matrix-scalar subtraction
    say (A * 42)    # matrix-scalar multiplication
    say (A / 42)    # matrix-scalar division

    say A**20       # matrix exponentation
    say A**-1       # matrix inverse: A^-1
    say A**-2       # (A^2)^-1

    say B.det             # matrix determinant
    say B.solve([1,2,3])  # solve a system of linear equations

=head1 INHERITS

Inherits methods from:

       * Sidef::Types::Array::Array

=head1 METHODS

=head2 %

    a % b

Returns the

Aliases: I<mod>

=cut

=head2 &

    a & b

Returns the

Aliases: I<and>

=cut

=head2 *

    a * b

Returns the

Aliases: I<mul>

=cut

=head2 **

    a ** b

Returns the

Aliases: I<pow>

=cut

=head2 +

    a + b

Returns the

Aliases: I<add>

=cut

=head2 -

    a - b

Returns the

Aliases: I<sub>

=cut

=head2 /

    a / b

Returns the

Aliases: I<÷>, I<div>

=cut

=head2 ^

    a ^ b

Returns the

Aliases: I<xor>

=cut

=head2 I

    Matrix.I(n)

Returns the

Aliases: I<identity>

=cut

=head2 |

    a | b

Returns the

Aliases: I<or>

=cut

=head2 abs

    m1.abs

Returns the

=cut

=head2 anti_diagonal

    self.anti_diagonal

Returns the

=cut

=head2 build

    Matrix.build(n, m, block)

Returns the

=cut

=head2 ceil

    self.ceil

Returns the

=cut

=head2 col

    self.col(n)

Returns the

Aliases: I<column>, I<get_column>

=cut

=head2 col_len

    A.col_len

Returns the

Aliases: I<col_size>, I<col_count>, I<column_len>, I<column_size>, I<column_count>

=cut

=head2 cols

    self.cols(*cols)

Returns the

Aliases: I<columns>, I<from_cols>, I<from_columns>

=cut

=head2 col_vector

    Matrix.col_vector(*list)

Returns the

Aliases: I<column_vector>

=cut

=head2 concat

    m1.concat(m2)

Returns the

=cut

=head2 det

    self.det

Returns the

Aliases: I<determinant>

=cut

=head2 det_bareiss

    self.det_bareiss

Returns the

=cut

=head2 diagonal

    self.diagonal

Returns the

=cut

=head2 flip

    self.flip

Returns the

=cut

=head2 floor

    self.floor

Returns the

=cut

=head2 gauss_jordan_invert

    self.gauss_jordan_invert

Returns the

=cut

=head2 gauss_jordan_solve

    self.gauss_jordan_solve(vector)

Returns the

=cut

=head2 horizontal_flip

    self.horizontal_flip

Returns the

=cut

=head2 inv

    self.inv

Returns the

Aliases: I<invert>, I<inverse>

=cut

=head2 invmod

    self.invmod(mod)

Returns the

=cut

=head2 is_square

    self.is_square

Returns the

=cut

=head2 neg

    m1.neg

Returns the

=cut

=head2 new

    self.new

Returns the

Aliases: I<call>

=cut

=head2 powmod

    A.powmod(pow, mod)

Returns the

=cut

=head2 prod

    A.prod(block)

Returns the

Aliases: I<prod_by>

=cut

=head2 rand

    Matrix.rand(n, m)

Returns the

=cut

=head2 row

    self.row(n)

Returns the

Aliases: I<get_row>

=cut

=head2 row_len

    A.row_len

Returns the

Aliases: I<row_size>, I<row_count>

=cut

=head2 rows

    self.rows(*rows)

Returns the

Aliases: I<from_rows>

=cut

=head2 row_vector

    Matrix.row_vector(*list)

Returns the

=cut

=head2 rref

    self.rref

Returns the

Aliases: I<reduced_row_echelon_form>

=cut

=head2 scalar

    Matrix.scalar(n, value)

Returns the

=cut

=head2 set_col

    A.set_col(k, col)

Returns the

Aliases: I<set_column>

=cut

=head2 set_row

    A.set_row(k, row)

Returns the

=cut

=head2 size

    self.size

Returns the

=cut

=head2 solve

    self.solve(vector)

Returns the

=cut

=head2 sum

    A.sum(block)

Returns the

Aliases: I<sum_by>

=cut

=head2 t

    matrix.t

Returns the

Aliases: I<not>, I<transpose>

=cut

=head2 to_a

    A.to_a

Returns the

Aliases: I<to_array>

=cut

=head2 to_s

    self.to_s

Returns the

Aliases: I<dump>, I<to_str>

=cut

=head2 vec_cols

    self.vec_cols

Returns the

Aliases: I<vec_columns>, I<vector_columns>

=cut

=head2 vec_rows

    self.vec_rows

Returns the

Aliases: I<vector_rows>

=cut

=head2 vertical_flip

    self.vertical_flip

Returns the

=cut

=head2 zero

    Matrix.zero(n, m)

Returns the

=cut
