normal?

normal?() Instance Public methods Returns true is this is a normal matrix. Raises an error if matrix is not square.

minor

minor(*param) Instance Public methods Returns a section of the matrix. The parameters are either: start_row, nrows, start_col, ncols; OR row_range, col_range Matrix.diagonal(9, 5, -3).minor(0..1, 0..2) => 9 0 0 0 5 0 Like Array#[], negative indices count backward from the end of the row or column (-1 is the last element). Returns nil if the starting row or column is greater than #row_count or #column_count respectively.

map

map() Instance Public methods Alias for: collect

lup_decomposition

lup_decomposition() Instance Public methods Alias for: lup

lup

lup() Instance Public methods Returns the LUP decomposition of the matrix; see LUPDecomposition. a = Matrix[[1, 2], [3, 4]] l, u, p = a.lup l.lower_triangular? # => true u.upper_triangular? # => true p.permutation? # => true l * u == p * a # => true a.lup.solve([2, 5]) # => Vector[(1/1), (1/2)] lup_decomposition

lower_triangular?

lower_triangular?() Instance Public methods Returns true is this is a lower triangular matrix.

inverse

inverse() Instance Public methods Returns the inverse of the matrix. Matrix[[-1, -1], [0, -1]].inverse => -1 1 0 -1 inv

inv

inv() Instance Public methods Alias for: inverse

inspect

inspect() Instance Public methods Overrides Object#inspect

index

index(value, selector = :all) â [row, column]index(selector = :all){ block } â [row, column]index(selector = :all) â an_enumerator Instance Public methods The index method is specialized to return the index as [row, column] It also accepts an optional selector argument, see each for details. Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1] Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0] find_index