204件ヒット
[1-100件を表示]
(0.121秒)
クラス
- Integer (24)
- Prime (60)
-
Prime
:: PseudoPrimeGenerator (120)
キーワード
- each (24)
-
each
_ with _ index (24) -
int
_ from _ prime _ division (12) - next (12)
- prime? (24)
-
prime
_ division (24) - rewind (12)
- succ (12)
-
upper
_ bound= (12) -
with
_ index (24) -
with
_ object (24)
検索結果
先頭5件
- Prime
# int _ from _ prime _ division(pd) -> Integer - Prime
:: PseudoPrimeGenerator # with _ object(obj) -> Enumerator - Prime
:: PseudoPrimeGenerator # with _ object(obj) {|prime , obj| . . . } -> object - Prime
:: PseudoPrimeGenerator # each _ with _ index -> Enumerator - Prime
:: PseudoPrimeGenerator # each _ with _ index {|prime , index| . . . } -> self
-
Prime
# int _ from _ prime _ division(pd) -> Integer (15215.0) -
素因数分解された結果を元の数値に戻します。
...
@param pd 整数のペアの配列を指定します。含まれているペアの第一要素は素因数を、
第二要素はその素因数の指数をあらわします。
//emlist[例][ruby]{
require 'prime'
Prime.int_from_prime_division([[2,2], [3,1]]) #=> 12
Prime.int_from_prim......e_division([[2,2], [3,2]]) #=> 36
//}
@see Prime.int_from_prime_division... -
Prime
:: PseudoPrimeGenerator # with _ object(obj) -> Enumerator (12227.0) -
与えられた任意のオブジェクトと要素をブロックに渡して評価します。
...
@param obj 任意のオブジェクトを指定します。
@return 最初に与えられたオブジェクトを返します。
@return ブロックを与えられた場合は obj を返します。ブロックを与えられなかった場合は Enumerator を返します。
@see Enumerator#wit......h_object... -
Prime
:: PseudoPrimeGenerator # with _ object(obj) {|prime , obj| . . . } -> object (12227.0) -
与えられた任意のオブジェクトと要素をブロックに渡して評価します。
...
@param obj 任意のオブジェクトを指定します。
@return 最初に与えられたオブジェクトを返します。
@return ブロックを与えられた場合は obj を返します。ブロックを与えられなかった場合は Enumerator を返します。
@see Enumerator#wit......h_object... -
Prime
:: PseudoPrimeGenerator # each _ with _ index -> Enumerator (12215.0) -
与えられたブロックに対して、素数を0起点の連番を渡して評価します。
...します。
@return ブロックを与えられた場合は self を返します。 ブロックを与えられなかった場合は 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 # each _ with _ index {|prime , index| . . . } -> self (12215.0) -
与えられたブロックに対して、素数を0起点の連番を渡して評価します。
...します。
@return ブロックを与えられた場合は self を返します。 ブロックを与えられなかった場合は 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 (12215.0) -
与えられたブロックに対して、素数を0起点の連番を渡して評価します。
...します。
@return ブロックを与えられた場合は self を返します。 ブロックを与えられなかった場合は 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 (12215.0) -
与えられたブロックに対して、素数を0起点の連番を渡して評価します。
...します。
@return ブロックを与えられた場合は self を返します。 ブロックを与えられなかった場合は 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 # upper _ bound=(upper _ bound) (12209.0) -
新しい列挙上界をセットします。
...新しい列挙上界をセットします。
@param upper_bound 新しい上界を整数または nil で指定します。 nil は上界がなく無限に素数を列挙すべきであることを意味します。... -
Prime
:: PseudoPrimeGenerator # rewind -> () (12115.0) -
列挙状態を巻き戻します。
...列挙状態を巻き戻します。
サブクラスで実装してください。
@raise NotImplementedError 必ず発生します。
@see Enumerator#rewind...