77件ヒット
[1-77件を表示]
(0.079秒)
ライブラリ
- prime (77)
キーワード
-
each
_ with _ index (22) - rewind (11)
-
with
_ index (22) -
with
_ object (22)
検索結果
先頭5件
- Prime
:: PseudoPrimeGenerator # each _ with _ index -> Enumerator - Prime
:: PseudoPrimeGenerator # with _ index -> Enumerator - Prime
:: PseudoPrimeGenerator # with _ object(obj) -> Enumerator - Prime
:: PseudoPrimeGenerator # each _ with _ index {|prime , index| . . . } -> self - Prime
:: PseudoPrimeGenerator # with _ index {|prime , index| . . . } -> self
-
Prime
:: PseudoPrimeGenerator # each _ with _ index -> Enumerator (116.0) -
与えられたブロックに対して、素数を0起点の連番を渡して評価します。
...を返します。 ブロックを与えられなかった場合は Enumerator を返します。
//emlist[例][ruby]{
require 'prime'
Prime::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}
@see Enumerator#with_index... -
Prime
:: PseudoPrimeGenerator # with _ index -> Enumerator (116.0) -
与えられたブロックに対して、素数を0起点の連番を渡して評価します。
...を返します。 ブロックを与えられなかった場合は Enumerator を返します。
//emlist[例][ruby]{
require 'prime'
Prime::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}
@see Enumerator#with_index... -
Prime
:: PseudoPrimeGenerator # with _ object(obj) -> Enumerator (115.0) -
与えられた任意のオブジェクトと要素をブロックに渡して評価します。
...bj 任意のオブジェクトを指定します。
@return 最初に与えられたオブジェクトを返します。
@return ブロックを与えられた場合は obj を返します。ブロックを与えられなかった場合は Enumerator を返します。
@see Enumerator#with_object... -
Prime
:: PseudoPrimeGenerator # each _ with _ index {|prime , index| . . . } -> self (16.0) -
与えられたブロックに対して、素数を0起点の連番を渡して評価します。
...を返します。 ブロックを与えられなかった場合は Enumerator を返します。
//emlist[例][ruby]{
require 'prime'
Prime::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}
@see Enumerator#with_index... -
Prime
:: PseudoPrimeGenerator # with _ index {|prime , index| . . . } -> self (16.0) -
与えられたブロックに対して、素数を0起点の連番を渡して評価します。
...を返します。 ブロックを与えられなかった場合は Enumerator を返します。
//emlist[例][ruby]{
require 'prime'
Prime::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}
@see Enumerator#with_index... -
Prime
:: PseudoPrimeGenerator # with _ object(obj) {|prime , obj| . . . } -> object (15.0) -
与えられた任意のオブジェクトと要素をブロックに渡して評価します。
...bj 任意のオブジェクトを指定します。
@return 最初に与えられたオブジェクトを返します。
@return ブロックを与えられた場合は obj を返します。ブロックを与えられなかった場合は Enumerator を返します。
@see Enumerator#with_object... -
Prime
:: PseudoPrimeGenerator # rewind -> () (8.0) -
列挙状態を巻き戻します。
...列挙状態を巻き戻します。
サブクラスで実装してください。
@raise NotImplementedError 必ず発生します。
@see Enumerator#rewind...