37件ヒット
[1-37件を表示]
(0.121秒)
ライブラリ
- set (37)
キーワード
- disjoint? (11)
- include? (11)
- intersect? (11)
- member? (4)
検索結果
先頭5件
-
Set
# include?(o) -> bool (6303.0) -
オブジェクト o がその集合に属する場合に true を返します。
...オブジェクト o がその集合に属する場合に true を返します。
@param o オブジェクトを指定します。
//emlist[][ruby]{
require 'set'
set = Set['hello', 'world']
p set.include?('world') # => true
p set.include?('bye') # => false
//}... -
Set
# disjoint?(set) -> bool (6302.0) -
self と set が互いに素な集合である場合に true を返します。
...self と set が互いに素な集合である場合に true を返します。
逆に self と set の共通集合かを確認する場合には Set#intersect? を
使用します。
@param self Set オブジェクトを指定します。
@raise ArgumentError 引数が Set オブジェクトで......ない場合に発生します。
//emlist[][ruby]{
require 'set'
p Set[1, 2, 3].disjoint? Set[3, 4] # => false
p Set[1, 2, 3].disjoint? Set[4, 5] # => true
//}
@see Set#intersect?... -
Set
# intersect?(set) -> bool (6302.0) -
self と set の共通要素がある場合に true を返します。
...と set の共通要素がある場合に true を返します。
@param self Set オブジェクトを指定します。
@raise ArgumentError 引数が Set オブジェクトでない場合に発生します。
require 'set'
p Set[1, 2, 3].intersect?(Set[3, 4]) # => true
p Set[1, 2, 3].int......ersect?(Set[4, 5]) # => false
@see Set#intersection, Set#disjoint?... -
Set
# include?(o) -> bool (3304.0) -
オブジェクト o がその集合に属する場合に true を返します。
...オブジェクト o がその集合に属する場合に true を返します。
@param o オブジェクトを指定します。
//emlist[][ruby]{
require 'set'
set = Set['hello', 'world']
p set.include?('world') # => true
p set.include?('bye') # => false
//}... -
Set
# member?(o) -> bool (3203.0) -
オブジェクト o がその集合に属する場合に true を返します。
...オブジェクト o がその集合に属する場合に true を返します。
@param o オブジェクトを指定します。
//emlist[][ruby]{
require 'set'
set = Set['hello', 'world']
p set.include?('world') # => true
p set.include?('bye') # => false
//}...