c

algebra.instances

DoubleAlgebra

class DoubleAlgebra extends Field[Double] with Serializable

Due to the way floating-point equality works, this instance is not lawful under equality, but is correct when taken as an approximation of an exact value.

If you would prefer an absolutely lawful fractional value, you'll need to investigate rational numbers or more exotic types.

Source
double.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DoubleAlgebra
  2. Field
  3. CommutativeSemifield
  4. MultiplicativeCommutativeGroup
  5. DivisionRing
  6. Semifield
  7. MultiplicativeGroup
  8. EuclideanRing
  9. GCDRing
  10. CommutativeRing
  11. CommutativeRng
  12. CommutativeRig
  13. MultiplicativeCommutativeMonoid
  14. CommutativeSemiring
  15. MultiplicativeCommutativeSemigroup
  16. Ring
  17. Rng
  18. AdditiveCommutativeGroup
  19. AdditiveGroup
  20. Rig
  21. MultiplicativeMonoid
  22. Semiring
  23. MultiplicativeSemigroup
  24. AdditiveCommutativeMonoid
  25. AdditiveCommutativeSemigroup
  26. AdditiveMonoid
  27. AdditiveSemigroup
  28. Serializable
  29. AnyRef
  30. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new DoubleAlgebra()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def additive: CommutativeGroup[Double]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def div(x: Double, y: Double): Double
    Definition Classes
    DoubleAlgebraMultiplicativeGroup
  8. def emod(a: Double, b: Double): Double
    Definition Classes
    FieldEuclideanRing
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def equot(a: Double, b: Double): Double
    Definition Classes
    FieldEuclideanRing
  12. def equotmod(a: Double, b: Double): (Double, Double)
    Definition Classes
    FieldEuclideanRing
  13. def euclideanFunction(a: Double): BigInt
    Definition Classes
    FieldEuclideanRing
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  15. def fromBigInt(n: BigInt): Double

    Convert the given BigInt to an instance of A.

    Convert the given BigInt to an instance of A.

    This is equivalent to n repeated summations of this ring's one, or -n summations of -one if n is negative.

    Most type class instances should consider overriding this method for performance reasons.

    Definition Classes
    DoubleAlgebraRing
  16. def fromDouble(x: Double): Double

    This is implemented in terms of basic Ring ops.

    This is implemented in terms of basic Ring ops. However, this is probably significantly less efficient than can be done with a specific type. So, it is recommended that this method be overriden.

    This is possible because a Double is a rational number.

    Definition Classes
    DoubleAlgebraFieldDivisionRing
  17. def fromInt(x: Int): Double

    Convert the given integer to an instance of A.

    Convert the given integer to an instance of A.

    Defined to be equivalent to sumN(one, n).

    That is, n repeated summations of this ring's one, or -n summations of -one if n is negative.

    Most type class instances should consider overriding this method for performance reasons.

    Definition Classes
    DoubleAlgebraRing
  18. def gcd(a: Double, b: Double)(implicit eqA: Eq[Double]): Double
    Definition Classes
    FieldEuclideanRingGCDRing
  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. def isOne(a: Double)(implicit ev: Eq[Double]): Boolean

    Tests if a is one.

    Tests if a is one.

    Definition Classes
    MultiplicativeMonoid
  23. def isZero(a: Double)(implicit ev: Eq[Double]): Boolean

    Tests if a is zero.

    Tests if a is zero.

    Definition Classes
    AdditiveMonoid
  24. def lcm(a: Double, b: Double)(implicit eqA: Eq[Double]): Double
    Definition Classes
    FieldEuclideanRingGCDRing
  25. def minus(x: Double, y: Double): Double
    Definition Classes
    DoubleAlgebraAdditiveGroup
  26. def multiplicative: CommutativeGroup[Double]
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def negate(x: Double): Double
    Definition Classes
    DoubleAlgebraAdditiveGroup
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. def one: Double
    Definition Classes
    DoubleAlgebraMultiplicativeMonoid
  32. def plus(x: Double, y: Double): Double
    Definition Classes
    DoubleAlgebraAdditiveSemigroup
  33. def positivePow(a: Double, n: Int): Double
    Attributes
    protected[this]
    Definition Classes
    MultiplicativeSemigroup
  34. def positiveSumN(a: Double, n: Int): Double
    Attributes
    protected[this]
    Definition Classes
    AdditiveSemigroup
  35. def pow(x: Double, y: Int): Double
  36. def product(as: TraversableOnce[Double]): Double

    Given a sequence of as, compute the product.

    Given a sequence of as, compute the product.

    Definition Classes
    MultiplicativeMonoid
    Annotations
    @nowarn()
  37. def reciprocal(x: Double): Double
    Definition Classes
    DoubleAlgebraMultiplicativeGroup
  38. def sum(as: TraversableOnce[Double]): Double

    Given a sequence of as, compute the sum.

    Given a sequence of as, compute the sum.

    Definition Classes
    AdditiveMonoid
    Annotations
    @nowarn()
  39. def sumN(a: Double, n: Int): Double
  40. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  41. def times(x: Double, y: Double): Double
  42. def toString(): String
    Definition Classes
    AnyRef → Any
  43. def tryProduct(as: TraversableOnce[Double]): Option[Double]

    Given a sequence of as, combine them and return the total.

    Given a sequence of as, combine them and return the total.

    If the sequence is empty, returns None. Otherwise, returns Some(total).

    Definition Classes
    MultiplicativeMonoidMultiplicativeSemigroup
    Annotations
    @nowarn()
  44. def trySum(as: TraversableOnce[Double]): Option[Double]

    Given a sequence of as, combine them and return the total.

    Given a sequence of as, combine them and return the total.

    If the sequence is empty, returns None. Otherwise, returns Some(total).

    Definition Classes
    AdditiveMonoidAdditiveSemigroup
    Annotations
    @nowarn()
  45. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  46. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  47. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  48. def zero: Double
    Definition Classes
    DoubleAlgebraAdditiveMonoid

Inherited from Field[Double]

Inherited from DivisionRing[Double]

Inherited from Semifield[Double]

Inherited from MultiplicativeGroup[Double]

Inherited from EuclideanRing[Double]

Inherited from GCDRing[Double]

Inherited from CommutativeRing[Double]

Inherited from CommutativeRng[Double]

Inherited from CommutativeRig[Double]

Inherited from CommutativeSemiring[Double]

Inherited from Ring[Double]

Inherited from Rng[Double]

Inherited from AdditiveGroup[Double]

Inherited from Rig[Double]

Inherited from Semiring[Double]

Inherited from AdditiveMonoid[Double]

Inherited from AdditiveSemigroup[Double]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped