るりまサーチ

最速Rubyリファレンスマニュアル検索!
575件ヒット [1-100件を表示] (0.171秒)
トップページ > クエリ:I[x] > クエリ:a[x] > クエリ:Ruby[x] > クエリ:result[x]

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

ライブラリ

クラス

モジュール

検索結果

<< 1 2 3 ... > >>

GC::Profiler.result -> String (21225.0)

GC のプロファイル情報をフォーマットし、文字列として返します。

...生した場合の実行例です。

$ ruby -e "GC::Profiler.enable; a = Array.new(100000){ 'aa' }; puts GC::Profiler.result"
GC 5 invokes.
I
ndex Invoke Time(sec) Use Size(byte) Total Size(byte) Total Object GC Time(ms)
1 0.012...
...: GC invokes
GC の起動回数
: Invoke Time
Ruby
が起動してから GC が起動するまでに経過した時間
: Use Size
ヒープ内での使用サイズ
: Total Size
ヒープ全体のサイズ
: Total Object
ヒープ内に存在するオブジェクトの個数
: GC Time
G...
...C の処理時間

@see GC::Profiler.report...

Array#repeated_combination(n) -> Enumerator (15508.0)

サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。

...生成する Enumerator オブジェクトを返します。

@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引...
...指定した場合に発生します。

//emlist[例][ruby]{
a
= [1, 2, 3]
a
.repeated_combination(1).to_a #=> [[1], [2], [3]]
a
.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a
.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],...
...,3,3,3]]
a
.repeated_combination(0).to_a #=> [[]] # one combination of length 0
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a
= [1, 2, 3]
result
= []
a
.repeated_combination(3) {...

Array#repeated_permutation(n) -> Enumerator (15496.0)

サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。

...生成する Enumerator オブジェクトを返します。

@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引数...
...mlist[例][ruby]{
a
= [1, 2]
a
.repeated_permutation(1).to_a #=> [[1], [2]]
a
.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a
.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a
.repeated_permutation...
....to_a #=> [[]] # one permutation of length 0
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a
= [1, 2]
result
= []
a
.repeated_permutation(3) {|e| result << e} # => [1,2]
result
#...

Array#repeated_combination(n) { |c| ... } -> self (15408.0)

サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。

...生成する Enumerator オブジェクトを返します。

@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引...
...指定した場合に発生します。

//emlist[例][ruby]{
a
= [1, 2, 3]
a
.repeated_combination(1).to_a #=> [[1], [2], [3]]
a
.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a
.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],...
...,3,3,3]]
a
.repeated_combination(0).to_a #=> [[]] # one combination of length 0
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a
= [1, 2, 3]
result
= []
a
.repeated_combination(3) {...

Array#repeated_permutation(n) { |p| ... } -> self (15396.0)

サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。

...生成する Enumerator オブジェクトを返します。

@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引数...
...mlist[例][ruby]{
a
= [1, 2]
a
.repeated_permutation(1).to_a #=> [[1], [2]]
a
.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a
.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a
.repeated_permutation...
....to_a #=> [[]] # one permutation of length 0
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a
= [1, 2]
result
= []
a
.repeated_permutation(3) {|e| result << e} # => [1,2]
result
#...

絞り込み条件を変える

Array#combination(n) -> Enumerator (12420.0)

サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。

...生成する Enumerator オブジェクトを返します。

@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引...
...//emlist[例][ruby]{
a
= [1, 2, 3, 4]
a
.combination(1).to_a #=> [[1],[2],[3],[4]]
a
.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
a
.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
a
.combination(4).to_a #=> [[1,2,3,4]]
a
.combination(0).to_a #=> [[]]: one combination of...
...ength 0
a
.combination(5).to_a #=> [] : no combinations of length 5
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a
= [1, 2, 3, 4]
result
= []
a
.combination(2) {|e| result << e}...

Array#permutation(n = self.length) -> Enumerator (12420.0)

サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。

...生成する Enumerator オブジェクトを返します。

@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引数...
...list[例][ruby]{
a
= [1, 2, 3]
a
.permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a
.permutation(1).to_a #=> [[1],[2],[3]]
a
.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a
.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a
.permuta...
...tion(0).to_a #=> [[]]: one permutation of length 0
a
.permutation(4).to_a #=> [] : no permutations of length 4
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a
= [1, 2, 3]
result
...

FileUtils#ruby(*args) {|result, status| ... } (12330.0)

与えられた引数で Ruby インタプリタを実行します。

...与えられた引数で Ruby インタプリタを実行します。

@param args Ruby インタプリタに与える引数を指定します。

例:
ruby
%{-pe '$_.upcase!' <README}

@see Kernel.#sh...

Array#combination(n) {|c| block } -> self (12320.0)

サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。

...生成する Enumerator オブジェクトを返します。

@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引...
...//emlist[例][ruby]{
a
= [1, 2, 3, 4]
a
.combination(1).to_a #=> [[1],[2],[3],[4]]
a
.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
a
.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
a
.combination(4).to_a #=> [[1,2,3,4]]
a
.combination(0).to_a #=> [[]]: one combination of...
...ength 0
a
.combination(5).to_a #=> [] : no combinations of length 5
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a
= [1, 2, 3, 4]
result
= []
a
.combination(2) {|e| result << e}...

Array#permutation(n = self.length) { |p| block } -> self (12320.0)

サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。

...生成する Enumerator オブジェクトを返します。

@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引数...
...list[例][ruby]{
a
= [1, 2, 3]
a
.permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a
.permutation(1).to_a #=> [[1],[2],[3]]
a
.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a
.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a
.permuta...
...tion(0).to_a #=> [[]]: one permutation of length 0
a
.permutation(4).to_a #=> [] : no permutations of length 4
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a
= [1, 2, 3]
result
...

絞り込み条件を変える

<< 1 2 3 ... > >>