Results for: "Logger"

Returns true if fix is zero.

Creates a zero matrix.

Matrix.zero(2)
  => 0 0
     0 0

Returns true if this is an hermitian matrix. Raises an error if matrix is not square.

Returns true if this is an orthogonal matrix Raises an error if matrix is not square.

Returns true if this is a permutation matrix Raises an error if matrix is not square.

Returns true if this is a matrix with only zero elements

Returns a clone of the matrix, so that the contents of each do not reference identical objects. There should be no good reason to do this since Matrices are immutable.

Returns the inverse of the matrix.

Matrix[[-1, -1], [0, -1]].inverse
  => -1  1
      0 -1

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

deprecated; use Matrix#determinant

Returns the Eigensystem of the matrix; see EigenvalueDecomposition.

m = Matrix[[1, 2], [3, 4]]
v, d, v_inv = m.eigensystem
d.diagonal? # => true
v.inv == v_inv # => true
(v * d * v_inv).round(5) == m # => true
No documentation available

The coerce method provides support for Ruby type coercion. This coercion mechanism is used by Ruby to handle mixed-type numeric operations: it is intended to find a compatible common type between the two operands of the operator. See also Numeric#coerce.

Returns a copy of the vector.

The coerce method provides support for Ruby type coercion. This coercion mechanism is used by Ruby to handle mixed-type numeric operations: it is intended to find a compatible common type between the two operands of the operator. See also Numeric#coerce.

Terminates option parsing. Optional parameter arg is a string pushed back to be the first non-option argument.

No documentation available

Heading banner preceding summary.

Version

Returns version string from program_name, version and release.

Parses command line arguments argv in order. When a block is given, each non-option argument is yielded.

Returns the rest of argv left unparsed.

Same as order, but removes switches destructively. Non-option arguments remain in argv.

Parses command line arguments argv in permutation mode and returns list of non-option arguments.

Same as permute, but removes switches destructively. Non-option arguments remain in argv.

Wrapper method for getopts.rb.

params = ARGV.getopts("ab:", "foo", "bar:", "zot:Z;zot option)
# params[:a] = true   # -a
# params[:b] = "1"    # -b1
# params[:foo] = "1"  # --foo
# params[:bar] = "x"  # --bar x
# params[:zot] = "z"  # --zot Z
Search took: 4ms  ·  Total Results: 2219