Results for: "partition"

Returns the ARGV array, which contains the arguments passed to your script, one per element.

For example:

$ ruby argf.rb -v glark.txt

ARGF.argv   #=> ["-v", "glark.txt"]

Reads the next character from ARGF and returns it as a String. Raises an EOFError after the last character of the last file has been read.

For example:

$ echo "foo" > file
$ ruby argf.rb file

ARGF.readchar  #=> "f"
ARGF.readchar  #=> "o"
ARGF.readchar  #=> "o"
ARGF.readchar  #=> "\n"
ARGF.readchar  #=> end of file reached (EOFError)

Writes string if inplace mode.

Returns the current filename. “-” is returned when the current file is STDIN.

For example:

$ echo "foo" > foo
$ echo "bar" > bar
$ echo "glark" > glark

$ ruby argf.rb foo bar glark

ARGF.filename  #=> "foo"
ARGF.read(5)   #=> "foo\nb"
ARGF.filename  #=> "bar"
ARGF.skip
ARGF.filename  #=> "glark"
No documentation available
No documentation available
No documentation available

Start tracing

Example

Tracer.on
# code to trace here
Tracer.off

You can also pass a block:

Tracer.on {
  # trace everything in this block
}
No documentation available

Returns a network byte ordered string form of the IP address.

Returns true iff the current severity level allows for the printing of WARN messages.

Sets the severity to WARN.

Log a WARN message.

See info for more information.

Creates a matrix where the diagonal elements are composed of values.

Matrix.diagonal(9, 5, -3)
#  =>  9  0  0
#      0  5  0
#      0  0 -3

Creates an n by n diagonal matrix where each diagonal element is value.

Matrix.scalar(2, 5)
#  => 5 0
#     0 5
No documentation available
No documentation available

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

Returns true if this is a regular (i.e. non-singular) matrix.

Returns true if this is a singular matrix.

Returns true if this is a square matrix.

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
No documentation available

Returns the imaginary part 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]].imaginary
#  =>   2i  i  0
#        0  0  0
No documentation available
Search took: 2ms  ·  Total Results: 2543