るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.044秒)
トップページ > クエリ:ruby[x] > クエリ:@[x] > 種類:インスタンスメソッド[x] > クラス:Set[x] > クエリ:disjoint?[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

検索結果

Set#disjoint?(set) -> bool (18138.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?...
...ない場合に発生します。

//emlist[][ruby]{
p Set[1, 2, 3].disjoint? Set[3, 4] # => false
p Set[1, 2, 3].disjoint? Set[4, 5] # => true
//}

@
see Set#intersect?...