Method: Cantor::AbsoluteSet#intersection

Defined in:
lib/cantor/absolute_set.rb

#intersection(other) ⇒ Object



160
161
162
163
164
165
166
167
168
# File 'lib/cantor/absolute_set.rb', line 160

def intersection(other)
  if other.is_a?(AbsoluteSet) and other.universe.eql?(@universe)
    copy(:mask => @mask & other.mask)
  elsif other.is_a?(AbstractSet) and other.infinite?
    other.intersection(self)
  else
    copy(:mask => @mask & as_mask(other, false))
  end
end