Class: Math::SetTheory::RealAlgebraicNumbers
- Includes:
- Singleton
- Defined in:
- lib/ruuuby/math/set_theory/discrete/real_algebraic_numbers.rb
Instance Attribute Summary
Attributes inherited from NumberSet
Attributes inherited from Closure
Instance Method Summary collapse
-
#_β?(n) ⇒ Boolean
β οΈ, coverage missing.
-
#initialize ⇒ RealAlgebraicNumbers
constructor
A new instance of RealAlgebraicNumbers.
Methods inherited from NumberSet
#countable?, #countably_infinite?, #finite?, #uncountable?, #β?, #β?, #β?, #β?, #β?, #β ?, #β?, #β?
Constructor Details
#initialize ⇒ RealAlgebraicNumbers
Returns a new instance of RealAlgebraicNumbers.
10 11 12 13 14 |
# File 'lib/ruuuby/math/set_theory/discrete/real_algebraic_numbers.rb', line 10 def initialize super(:πΈα΅£, ::Math::SetTheory::NumberSet::AlephNumbers::ZERO, {dense: true}) @subset_of = [:π, :β, :β, :πΈ] @superset_of = [:πΉ, :β, :π, :β€, :β] end |
Instance Method Details
#_β?(n) ⇒ Boolean
β οΈ, coverage missing
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/ruuuby/math/set_theory/discrete/real_algebraic_numbers.rb', line 19 def _β?(n) case(n) when ::Integer true when ::Float if β.β?(n) if β€.β?(n) true else nil end else false end when ::BigDecimal return false unless n.finite? return true if β€.β?(n) nil when ::Complex n.imaginary == 0 && β.β?(n.real) when ::Rational (β€.β?(n.numerator) && β€.β?(n.denominator)) ? true : nil else false end end |