conj() Instance Public methods Alias for: conjugate
conjugate() Instance Public methods Returns the conjugate of the matrix. Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]] => 1+2i i 0 1 2 3 Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].conjugate => 1-2i -i 0 1 2 3 conj
det() Instance Public methods Alias for: determinant
det_e() Instance Public methods Alias for: determinant_e
determinant() Instance Public methods Returns the determinant of the matrix. Beware that using Float values can yield erroneous results because of their lack of precision. Consider using exact types like Rational or BigDecimal instead. Matrix[[7,6], [3,9]].determinant => 45 det
determinant_e() Instance Public methods deprecated; use #determinant det_e
diagonal?() Instance Public methods Returns true is this is a diagonal matrix. Raises an error if matrix is not square.
each(which = :all) Instance Public methods Yields all elements of the matrix, starting with those of the first row, or returns an Enumerator is no block given. Elements can be restricted by passing an argument: :all (default): yields all elements :diagonal: yields only elements on the diagonal :off_diagonal: yields all elements except on the diagonal :lower: yields only elements on or below the diagonal :strict_lower: yields only elements below the diagonal :strict_upper
each_with_index(which = :all) Instance Public methods Same as each, but the row index and column index in addition to the element Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col| puts "#{e} at #{row}, #{col}" end # => Prints: # 1 at 0, 0 # 2 at 0, 1 # 3 at 1, 0 # 4 at 1, 1
eigen() Instance Public methods Alias for: eigensystem
Page 550 of 11844