Class: Math::SetTheory::BooleanNumbers
- Includes:
- Singleton
- Defined in:
- lib/ruuuby/math/set_theory/discrete/boolean_numbers.rb
Instance Attribute Summary
Attributes inherited from NumberSet
Attributes inherited from Closure
Instance Method Summary collapse
-
#_β?(n) ⇒ Boolean
True, if this number is equivalent to 0 or 1 (all numbers in the boolean-domain+πΉ+).
-
#initialize ⇒ BooleanNumbers
constructor
A new instance of BooleanNumbers.
Methods inherited from NumberSet
#countable?, #countably_infinite?, #finite?, #uncountable?, #β?, #β?, #β?, #β?, #β?, #β ?, #β?, #β?
Constructor Details
#initialize ⇒ BooleanNumbers
Returns a new instance of BooleanNumbers.
10 11 12 13 |
# File 'lib/ruuuby/math/set_theory/discrete/boolean_numbers.rb', line 10 def initialize super(:πΉ, 2) @subset_of = [:π, :πΈα΅£, :πΈ, :β, :β, :β, :β€, :π] end |
Instance Method Details
#_β?(n) ⇒ Boolean
Returns true, if this number is equivalent to 0 or 1 (all numbers in the boolean-domain+πΉ+).
18 |
# File 'lib/ruuuby/math/set_theory/discrete/boolean_numbers.rb', line 18 def _β?(n); n.zero? || n.one?; end |