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:
PointorVector
- Self Type
- N
- Alphabetic
- By Inheritance
- Number
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Abstract Value Members
- abstract def companion: NumberCompanion[N]
Companion object that was used to create the number.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def -(that: N): Vector
Returns Vector representing difference between
thisandthatnumbers (which must be both Points or both Vectors). - final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def abs: N
Returns absolute value of this number.
- final def add(that: Number[_]): Digits
- Attributes
- protected
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def compare(that: N): Int
How does
thisnumber compare withthat? - final val digits: Digits
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def equals(other: Any): Boolean
Are the two numbers equal?
Are the two numbers equal?
- Definition Classes
- Number → AnyRef → Any
- final def get(position: Int): Int
Returns digit at
position. - final def get(digit: Digit): Int
Returns digit described by the Digit descriptor
digit. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def hashCode(): Int
- Definition Classes
- Number → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def isNegative: Boolean
Is this number less than
0? - final def isPositive: Boolean
Is this number greater than
0? - final def isZero: Boolean
Is this number equal to
0? - final def length: Int
Returns number of digits after the
point. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def roundTo(length: Int): N
Returns this number rounded to the
position. - final def roundTo(digit: Digit): N
Returns this number rounded to the digit described by the Digit descriptor
digit. - final def set(position: Int, value: Int): N
Returns this number with digit at
positionset tovalue. - final def set(digit: Digit, value: Int): N
Returns this number with digit described by the Digit descriptor
digitset tovalue. - final def signum: Int
Returns the signum of this number:
-1if it is negative,1if it is positive and0if it is neither. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def toDouble: Double
Converts this number to
Double. - final def toRational: BigRational
Converts this number to org.opentorah.numbers.BigRational.
- def toString(): String
Returns string representation of this number.
Returns string representation of this number.
- Definition Classes
- Number → AnyRef → Any
- final def toString(length: Int): String
Returns string representation of this number with
lengthpositions (padding/truncating as needed). - final def unary_-: N
Returns this number with the sign inverted.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated