2484件ヒット
[2401-2484件を表示]
(0.063秒)
ライブラリ
クラス
-
ARGF
. class (93) - Array (324)
- Complex (24)
- Date (36)
- Dir (19)
- Enumerator (163)
-
Enumerator
:: ArithmeticSequence (70) -
Enumerator
:: Lazy (317) - Float (24)
- Hash (168)
- IO (138)
- Integer (60)
- Matrix (86)
- Numeric (81)
- Object (63)
- Pathname (39)
- Prime (12)
-
Prime
:: PseudoPrimeGenerator (36) - Range (59)
- Rational (24)
- String (80)
- StringIO (88)
- Struct (19)
- Vector (24)
-
Zlib
:: GzipReader (36)
モジュール
- Enumerable (368)
- TSort (33)
キーワード
- % (14)
- + (7)
- == (7)
- begin (7)
- bsearch (24)
-
bsearch
_ index (10) - bytes (14)
- chain (7)
- chars (14)
- chunk (36)
-
chunk
_ while (21) - codepoints (14)
- collect (48)
- collect! (19)
- collect2 (12)
-
collect
_ concat (12) - combination (12)
- cycle (24)
-
delete
_ if (24) - denominator (60)
- detect (12)
- downto (24)
- drop (12)
-
drop
_ while (24) - each (218)
- each2 (12)
-
each
_ byte (60) -
each
_ char (48) -
each
_ child (19) -
each
_ codepoint (24) -
each
_ cons (12) -
each
_ entry (15) -
each
_ grapheme _ cluster (8) -
each
_ index (12) -
each
_ key (12) -
each
_ line (108) -
each
_ pair (12) -
each
_ slice (12) -
each
_ strongly _ connected _ component (11) -
each
_ strongly _ connected _ component _ from (11) -
each
_ value (12) -
each
_ with _ index (36) -
each
_ with _ object (12) - end (7)
-
enum
_ for (24) - feed (12)
- filter (35)
- filter! (14)
-
filter
_ map (12) - find (24)
-
find
_ all (24) -
find
_ index (36) - first (14)
-
flat
_ map (12) - grep (12)
-
grep
_ v (10) - gsub (12)
- gsub! (12)
- index (24)
-
keep
_ if (24) - last (14)
- lazy (12)
- lines (49)
- map (48)
- map! (19)
-
max
_ by (24) -
min
_ by (24) -
minmax
_ by (12) - next (12)
-
next
_ values (12) - peek (12)
-
peek
_ values (12) - permutation (12)
- reject (48)
- reject! (24)
-
repeated
_ combination (12) -
repeated
_ permutation (12) -
reverse
_ each (14) - rewind (12)
- rindex (12)
- select (60)
- select! (24)
- size (19)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) -
sort
_ by (12) -
sort
_ by! (12) - step (88)
- take (12)
-
take
_ while (48) - then (7)
- times (12)
-
to
_ enum (24) -
transform
_ keys (8) -
transform
_ keys! (8) -
transform
_ values (9) -
transform
_ values! (9) -
tsort
_ each (11) - upto (24)
-
with
_ index (24) -
with
_ object (36) -
yield
_ self (8) - zip (24)
検索結果
先頭5件
-
Struct
# filter -> Enumerator (107.0) -
構造体のメンバの値に対してブロックを評価した値が真であった要素を全て含 む配列を返します。真になる要素がひとつもなかった場合は空の配列を返しま す。
...列を返します。真になる要素がひとつもなかった場合は空の配列を返しま
す。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
Lots = Struct.new(:a, :b, :c, :d, :e, :f)
l = Lots.new(11, 22, 33, 44, 55, 66)
l.select {|v| (v % 2).ze......ro? } #=> [22, 44, 66]
//}
[注意] 本メソッドの記述は Struct の下位クラスのインスタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。
@see Enumerable#select... -
Struct
# select -> Enumerator (107.0) -
構造体のメンバの値に対してブロックを評価した値が真であった要素を全て含 む配列を返します。真になる要素がひとつもなかった場合は空の配列を返しま す。
...列を返します。真になる要素がひとつもなかった場合は空の配列を返しま
す。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
Lots = Struct.new(:a, :b, :c, :d, :e, :f)
l = Lots.new(11, 22, 33, 44, 55, 66)
l.select {|v| (v % 2).ze......ro? } #=> [22, 44, 66]
//}
[注意] 本メソッドの記述は Struct の下位クラスのインスタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。
@see Enumerable#select... -
TSort
# each _ strongly _ connected _ component -> Enumerator (107.0) -
TSort#strongly_connected_components メソッドのイテレータ版です。 obj.each_strongly_connected_component は obj.strongly_connected_components.each に似ていますが、 ブロックの評価中に obj が変更された場合は予期しない結果になる ことがあります。
...tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
non_sort.each_strongly_connected_component{|nodes|
p nodes
}
#出力
#=> [4]
#=> [2, 3]
#=> [1]
//}
@see TSort.each_strongly_connected_component... -
Complex
# denominator -> Integer (25.0) -
分母を返します。
...と虚部の分母の最小公倍数を整数で返します。
1 2 3+4i <- numerator(分子)
- + -i -> ----
2 3 6 <- denominator(分母)
//emlist[例][ruby]{
Complex('1/2+2/3i').denominator # => 6
Complex(3).numerator # => 1
//}
@see Complex#numerator... -
Float
# denominator -> Integer (19.0) -
自身を Rational に変換した時の分母を返します。
...自身を Rational に変換した時の分母を返します。
@return 分母を返します。
//emlist[例][ruby]{
2.0.denominator # => 1
0.5.denominator # => 2
//}
@see Float#numerator... -
Integer
# denominator -> Integer (19.0) -
分母(常に1)を返します。
...分母(常に1)を返します。
@return 分母を返します。
//emlist[][ruby]{
10.denominator # => 1
-10.denominator # => 1
//}
@see Integer#numerator... -
Numeric
# denominator -> Integer (19.0) -
自身を Rational に変換した時の分母を返します。
...自身を Rational に変換した時の分母を返します。
@return 分母を返します。
@see Numeric#numerator、Integer#denominator、Float#denominator、Rational#denominator、Complex#denominator... -
Rational
# denominator -> Integer (19.0) -
分母を返します。常に正の整数を返します。
...分母を返します。常に正の整数を返します。
@return 分母を返します。
//emlist[例][ruby]{
Rational(7).denominator # => 1
Rational(7, 1).denominator # => 1
Rational(9, -4).denominator # => 4
Rational(-2, -10).denominator # => 5
//}
@see Rational#numerator...