るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.032秒)

別のキーワード

  1. net/imap param
  2. win32ole win32ole_param
  3. win32ole_param new
  4. win32ole_param name
  5. win32ole_param to_s

ライブラリ

検索結果

Matrix#each_with_index(which = :all) -> Enumerator (14.0)

行列の各要素をその位置とともに引数としてブロックを呼び出します。

...できます。
Matrix
#each と同じなのでそちらを参照してください。

ブロックを省略した場合、 Enumerator を返します。

//emlist[例][ruby]{
require 'matrix'
Matrix
[ [1,2], [3,4] ].each_with_index do |e, row, col|
puts "#{e} at #{row}, #{col}"
end

# => 1 at 0,...
...0
# => 2 at 0, 1
# => 3 at 1, 0
# => 4 at 1, 1
//}

@param which どの要素に対してブロックを呼び出すのかを Symbol で指定します
@see Matrix#each...

Matrix#each_with_index(which = :all) {|e, row, col| ... } -> self (14.0)

行列の各要素をその位置とともに引数としてブロックを呼び出します。

...できます。
Matrix
#each と同じなのでそちらを参照してください。

ブロックを省略した場合、 Enumerator を返します。

//emlist[例][ruby]{
require 'matrix'
Matrix
[ [1,2], [3,4] ].each_with_index do |e, row, col|
puts "#{e} at #{row}, #{col}"
end

# => 1 at 0,...
...0
# => 2 at 0, 1
# => 3 at 1, 0
# => 4 at 1, 1
//}

@param which どの要素に対してブロックを呼び出すのかを Symbol で指定します
@see Matrix#each...