Packages

abstract class Number[N <: Number[N]] extends AnyRef

Number (Point or Vector) from the number system. Number is a sequence of fractions where numerator is the digit and denominator for each position is determined by the number system (the point comes after the first digit, which denominator is 1). Numbers from the same number system and with the same companion can be compared for equality and order.

N

type of the number: Point or Vector

Self Type
N
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Number
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Number(digits: Digits)

    digits

    sequence of the digits comprising this number.

Abstract Value Members

  1. abstract def companion: NumberCompanion[N]

    Companion object that was used to create the number.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def -(that: N): Vector

    Returns Vector representing difference between this and that numbers (which must be both Points or both Vectors).

  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def abs: N

    Returns absolute value of this number.

  6. final def add(that: Number[_]): Digits
    Attributes
    protected
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  9. final def compare(that: N): Int

    How does this number compare with that?

  10. final val digits: Digits
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def equals(other: Any): Boolean

    Are the two numbers equal?

    Are the two numbers equal?

    Definition Classes
    Number → AnyRef → Any
  13. final def get(position: Int): Int

    Returns digit at position.

  14. final def get(digit: Digit): Int

    Returns digit described by the Digit descriptor digit.

  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def hashCode(): Int
    Definition Classes
    Number → AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def isNegative: Boolean

    Is this number less than 0?

  19. final def isPositive: Boolean

    Is this number greater than 0?

  20. final def isZero: Boolean

    Is this number equal to 0?

  21. final def length: Int

    Returns number of digits after the point.

  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def roundTo(length: Int): N

    Returns this number rounded to the position.

  26. final def roundTo(digit: Digit): N

    Returns this number rounded to the digit described by the Digit descriptor digit.

  27. final def set(position: Int, value: Int): N

    Returns this number with digit at position set to value.

  28. final def set(digit: Digit, value: Int): N

    Returns this number with digit described by the Digit descriptor digit set to value.

  29. final def signum: Int

    Returns the signum of this number: -1 if it is negative, 1 if it is positive and 0 if it is neither.

  30. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  31. final def toDouble: Double

    Converts this number to Double.

  32. final def toRational: BigRational

    Converts this number to org.opentorah.numbers.BigRational.

  33. def toString(): String

    Returns string representation of this number.

    Returns string representation of this number.

    Definition Classes
    Number → AnyRef → Any
  34. final def toString(length: Int): String

    Returns string representation of this number with length positions (padding/truncating as needed).

  35. final def unary_-: N

    Returns this number with the sign inverted.

  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  38. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped