るりまサーチ

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

別のキーワード

  1. _builtin *
  2. matrix *
  3. vector *
  4. array *
  5. bigdecimal *

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Benchmark::Report#item(label = "", *fmt) { ... } -> Benchmark::Tms (18204.0)

ラベルと与えられたブロックの実行時間を標準出力に出力します。

ラベルと与えられたブロックの実行時間を標準出力に出力します。

出力のフォーマットは Benchmark::Tms#format が行います。

@param label ラベル
@param fmt 結果に出力したいオブジェクト

@see Benchmark::Tms#format

Benchmark::Report#report(label = "", *fmt) { ... } -> Benchmark::Tms (3104.0)

ラベルと与えられたブロックの実行時間を標準出力に出力します。

ラベルと与えられたブロックの実行時間を標準出力に出力します。

出力のフォーマットは Benchmark::Tms#format が行います。

@param label ラベル
@param fmt 結果に出力したいオブジェクト

@see Benchmark::Tms#format

RSS::Rss::Channel::Item::Guid#isPermaLink (3007.0)

@todo

...@todo

*
http://purl.org/dc/elements/1.1/...

Shell#join(*item) -> String (208.0)

File クラスにある同名のクラスメソッドと同じです.

...File クラスにある同名のクラスメソッドと同じです.

@param item 連結したいディレクトリ名やファイル名を文字列で与えます。

@see File.join...

Shell::CommandProcessor#join(*item) -> String (208.0)

File クラスにある同名のクラスメソッドと同じです.

...File クラスにある同名のクラスメソッドと同じです.

@param item 連結したいディレクトリ名やファイル名を文字列で与えます。

@see File.join...

絞り込み条件を変える

Shell::Filter#join(*item) -> String (208.0)

File クラスにある同名のクラスメソッドと同じです.

...File クラスにある同名のクラスメソッドと同じです.

@param item 連結したいディレクトリ名やファイル名を文字列で与えます。

@see File.join...

Enumerable#each_with_index(*args) {|item, index| ... } -> self (202.0)

要素とそのインデックスをブロックに渡して繰り返します。

要素とそのインデックスをブロックに渡して繰り返します。

ブロックを省略した場合は、
要素とそのインデックスを繰り返すような
Enumerator を返します。

Enumerator#with_index は offset 引数を受け取りますが、
each_with_index は受け取りません (引数はイテレータメソッドにそのまま渡されます)。

@param args イテレータメソッド (each など) にそのまま渡されます。

//emlist[例][ruby]{
[5, 10, 15].each_with_index do |n, idx|
p [n, idx]
end
#...

Enumerable#max_by {|item| ... } -> object | nil (127.0)

各要素を順番にブロックに渡して実行し、 その評価結果を <=> で比較して、 最大であった値に対応する元の要素、もしくは最大の n 要素が降順で入った配列を返します。

... ** (1.0/yield(v)) }
end
end
e = (-20..20).to_a*10000
a = e.wsample(20000) {|x|
Math.exp(-(x/5.0)**2) # normal distribution
}
# a is 20000 samples from e.
p a.length #=> 20000
h = a.group_by {|x| x }
-10.upto(10) {|x| puts "*" * (h[x].length/30.0).to_i if h[x] }
#=> *
# ***
# ******
# ****...
...*******
# ******************
# *****************************
# *****************************************
# ****************************************************
# ***************************************************************
# ************************************************************...
...********
# ***********************************************************************
# ***********************************************************************
# **************************************************************
# ****************************************************
# ***********...

Enumerable#max_by(n) {|item| ... } -> Array (127.0)

各要素を順番にブロックに渡して実行し、 その評価結果を <=> で比較して、 最大であった値に対応する元の要素、もしくは最大の n 要素が降順で入った配列を返します。

... ** (1.0/yield(v)) }
end
end
e = (-20..20).to_a*10000
a = e.wsample(20000) {|x|
Math.exp(-(x/5.0)**2) # normal distribution
}
# a is 20000 samples from e.
p a.length #=> 20000
h = a.group_by {|x| x }
-10.upto(10) {|x| puts "*" * (h[x].length/30.0).to_i if h[x] }
#=> *
# ***
# ******
# ****...
...*******
# ******************
# *****************************
# *****************************************
# ****************************************************
# ***************************************************************
# ************************************************************...
...********
# ***********************************************************************
# ***********************************************************************
# **************************************************************
# ****************************************************
# ***********...

Enumerable#grep_v(pattern) { |item| ... } -> [object] (124.0)

Enumerable#grep のマッチの条件を逆にして、pattern === item が成立 しない要素を全て含んだ配列を返します。

...て、pattern === item が成立
しない要素を全て含んだ配列を返します。

@param pattern 「===」メソッドを持つオブジェクトを指定します。

//emlist[例][ruby]{
(1..10).grep_v 2..5 # => [1, 6, 7, 8, 9, 10]
res =(1..10).grep_v(2..5) { |v| v * 2 }
res...

絞り込み条件を変える

Enumerator::Lazy#collect_concat {|item| ... } -> Enumerator::Lazy (115.0)

ブロックの実行結果をひとつに繋げたものに対してイテレートするような Enumerator::Lazy のインスタンスを返します。

..."b", "a", "r"]
//}

ブロックの返した値 x は、以下の場合にのみ分解され、連結されます。

*
x が配列であるか、to_ary メソッドを持つとき
*
x が each および force メソッドを持つ (例:Enumerator::Lazy) とき

それ以外のときは、x は...
<< 1 2 3 ... > >>