final class IdealRat extends Ordered[IdealRat]
Naive implementation of rational numbers
- Alphabetic
- By Inheritance
- IdealRat
- Ordered
- Comparable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
-   final  def !=(arg0: Any): Boolean- Definition Classes
- AnyRef → Any
 
-   final  def ##: Int- Definition Classes
- AnyRef → Any
 
-    def *(that: IdealRat): IdealRatMultiplication of IdealRat
-    def +(that: IdealRat): IdealRatAddition of IdealRat
-    def -(that: IdealRat): IdealRatSubtraction of IdealRat
-    def /(that: IdealRat): IdealRatDivision of IdealRat.Division of IdealRat. We use euclidian division with remainder, i.e., the propertythis == (this / that) * that + (this % that)holds, andthis % that >= 0andthis % that < that.abs.TODO: make this more efficient 
-    def <(that: IdealRat): Boolean- Definition Classes
- Ordered
 
-    def <=(that: IdealRat): Boolean- Definition Classes
- Ordered
 
-   final  def ==(arg0: Any): Boolean- Definition Classes
- AnyRef → Any
 
-    def >(that: IdealRat): Boolean- Definition Classes
- Ordered
 
-    def >=(that: IdealRat): Boolean- Definition Classes
- Ordered
 
-    def abs: IdealRatReturns the absolute value of this IdealRat
-   final  def asInstanceOf[T0]: T0- Definition Classes
- Any
 
-    def clone(): AnyRef- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
 
-    def compare(that: IdealRat): IntCompares this IdealRatwith the specifiedIdealRatCompares this IdealRatwith the specifiedIdealRat- Definition Classes
- IdealRat → Ordered
 
-    def compareTo(that: IdealRat): Int- Definition Classes
- Ordered → Comparable
 
-  val denom: IdealInt
-   final  def eq(arg0: AnyRef): Boolean- Definition Classes
- AnyRef
 
-    def equals(that: IdealRat): BooleanCompares this IdealRatwith the specifiedIdealRatfor equality.
-    def equals(that: Any): BooleanCompares this IdealRatwith the specified value for equality.Compares this IdealRatwith the specified value for equality.- Definition Classes
- IdealRat → AnyRef → Any
 
-   final  def getClass(): Class[_ <: AnyRef]- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
 
-    def hashCode(): IntReturns the hash code for this IdealRat.Returns the hash code for this IdealRat.- Definition Classes
- IdealRat → AnyRef → Any
 
-  def intValue: Int
-   final  def isInstanceOf[T0]: Boolean- Definition Classes
- Any
 
-    def isMinusOne: BooleanReturns trueiff thisIdealRatis -one
-    def isOne: BooleanReturns trueiff thisIdealRatis one
-    def isUnit: BooleanReturns trueiff thisIdealRatis one or -one
-    def isZero: BooleanReturns trueiff thisIdealRatis zero
-  def longValue: Long
-    def max(that: IdealRat): IdealRatReturns the maximum of this and that 
-    def min(that: IdealRat): IdealRatReturns the minimum of this and that 
-   final  def ne(arg0: AnyRef): Boolean- Definition Classes
- AnyRef
 
-   final  def notify(): Unit- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
 
-   final  def notifyAll(): Unit- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
 
-  val num: IdealInt
-    def signum: IntReturns the sign of this IdealRat, i.e.Returns the sign of this IdealRat, i.e. -1 if it is less than 0, +1 if it is greater than 0 0 if it is equal to 0
-   final  def synchronized[T0](arg0: => T0): T0- Definition Classes
- AnyRef
 
-    def toString(): StringReturns the Stringrepresentation of thisIdealRat.Returns the Stringrepresentation of thisIdealRat.- Definition Classes
- IdealRat → AnyRef → Any
 
-    def unary_-: IdealRatReturns a IdealRatwhose value is the negation of thisIdealRat
-   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
- (Since version 9)