Class: Math::SetTheory::RealNumbers
- Includes:
- Singleton
- Defined in:
- lib/ruuuby/math/set_theory/discrete/real_numbers.rb
Overview
includes all the measuring-numbers
Instance Attribute Summary
Attributes inherited from NumberSet
Attributes inherited from Closure
Instance Method Summary collapse
- #_β?(n) ⇒ Boolean
-
#initialize ⇒ RealNumbers
constructor
A new instance of RealNumbers.
Methods inherited from NumberSet
#countable?, #countably_infinite?, #finite?, #uncountable?, #β?, #β?, #β?, #β?, #β?, #β ?, #β?, #β?
Constructor Details
#initialize ⇒ RealNumbers
Returns a new instance of RealNumbers.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ruuuby/math/set_theory/discrete/real_numbers.rb', line 11 def initialize super(:β, ::Math::SetTheory::NumberSet::AlephNumbers::ONE, { closed_under_addition: true, closed_under_multiplication: true, closed_under_subtraction: true, closed_under_division: true, dense: true, continuous: true }) @subset_of = [:π, :β] @superset_of = [:πΉ, :β, :π, :β€, :πΈα΅£, :πΈ, :β, :π] end |
Instance Method Details
#_β?(n) ⇒ Boolean
25 26 27 28 29 30 31 32 33 |
# File 'lib/ruuuby/math/set_theory/discrete/real_numbers.rb', line 25 def _β?(n) case(n) when ::Integer; true when ::Float, BigDecimal; n.to_f.finite? when ::Complex; n.imaginary == 0 && β.β?(n.real) when ::Rational; β.β?(n.numerator) && β.β?(n.denominator) else; false end end |