Results for: "String#[]"

Returns true if headers are written in output. See CSV::new for details.

Stores the indicated separators for later use.

If auto-discovery was requested for @row_sep, this method will read ahead in the @io and try to find one. ARGF, STDIN, STDOUT, STDERR and any stream open for output only with a default @row_sep of $INPUT_RECORD_SEPARATOR ($/).

This method also establishes the quoting rules used for CSV output.

Pre-compiles parsers and stores them by name for access during reads.

Loads any converters requested during construction.

If field_name is set :converters (the default) field converters are set. When field_name is :header_converters header converters are added instead.

The :unconverted_fields option is also activated for :converters calls, if requested.

Stores header row settings and loads header converters, if needed.

Stores the pattern of comments to skip from the provided options.

The pattern must respond to .match, else ArgumentError is raised. Strings are converted to a Regexp.

See also CSV.new

Returns the list of break points where execution will be stopped.

See DEBUGGER__ for more usage

No documentation available
No documentation available

Returns a string for DNS reverse lookup compatible with RFC1886.

Creates a Range object for the network address.

No documentation available
No documentation available

Returns the names of the binding’s local variables as symbols.

def foo
  a = 1
  2.times do |n|
    binding.local_variables #=> [:a, :n]
  end
end

This method is the short version of the following code:

binding.eval("local_variables")
No documentation available

Private. Use Matrix#determinant

Returns the determinant of the matrix, using Bareiss’ multistep integer-preserving gaussian elimination. It has the same computational cost order O(n^3) as standard Gaussian elimination. Intermediate results are fraction free and of lower complexity. A matrix of Integers will have thus intermediate results that are also Integers, with smaller bignums (if any), while a matrix of Float will usually have intermediate results with better precision.

Returns the inner product of this vector with the other.

Vector[4,7].inner_product Vector[10,1]  => 47

Returns an angle with another vector. Result is within the [0…Math::PI].

Vector[1,0].angle_with(Vector[0,1])
# => Math::PI / 2
No documentation available
No documentation available
No documentation available
No documentation available

Returns the portion of the original string after the current match. Equivalent to the special variable $'.

m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie")
m.post_match   #=> ": The Movie"

Returns the factorization of value.

Parameters

value

An arbitrary integer.

generator

Optional. A pseudo-prime generator. generator.succ must return the next pseudo-prime number in the ascending order. It must generate all prime numbers, but may also generate non prime numbers too.

Exceptions

ZeroDivisionError

when value is zero.

Example

For an arbitrary integer:

n = p_1**e_1 * p_2**e_2 * .... * p_n**e_n,

prime_division(n) returns:

[[p_1, e_1], [p_2, e_2], ...., [p_n, e_n]].

Prime.prime_division(12) #=> [[2,2], [3,1]]
No documentation available
Search took: 5ms  ·  Total Results: 2925