Class

algebra.instances

DoubleAlgebra

Related Doc: package instances

Permalink

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.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DoubleAlgebra
  2. Field
  3. MultiplicativeCommutativeGroup
  4. MultiplicativeGroup
  5. EuclideanRing
  6. CommutativeRing
  7. CommutativeRig
  8. MultiplicativeCommutativeMonoid
  9. MultiplicativeCommutativeSemigroup
  10. Ring
  11. Rng
  12. AdditiveCommutativeGroup
  13. AdditiveGroup
  14. Rig
  15. MultiplicativeMonoid
  16. Semiring
  17. MultiplicativeSemigroup
  18. AdditiveCommutativeMonoid
  19. AdditiveCommutativeSemigroup
  20. AdditiveMonoid
  21. AdditiveSemigroup
  22. Serializable
  23. Serializable
  24. AnyRef
  25. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DoubleAlgebra()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def additive: CommutativeGroup[Double]

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def div(x: Double, y: Double): Double

    Permalink
    Definition Classes
    DoubleAlgebraMultiplicativeGroup
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def fromDouble(x: Double): Double

    Permalink

    This is implemented in terms of basic Field ops.

    This is implemented in terms of basic Field 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
    DoubleAlgebraField
  12. def fromInt(x: Int): Double

    Permalink

    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
  13. def gcd(x: Double, y: Double): Double

    Permalink
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. def isOne(a: Double)(implicit ev: Eq[Double]): Boolean

    Permalink

    Tests if a is one.

    Tests if a is one.

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

    Permalink

    Tests if a is zero.

    Tests if a is zero.

    Definition Classes
    AdditiveMonoid
  19. def minus(x: Double, y: Double): Double

    Permalink
    Definition Classes
    DoubleAlgebraAdditiveGroup
  20. def mod(x: Double, y: Double): Double

    Permalink
    Definition Classes
    DoubleAlgebraEuclideanRing
  21. def multiplicative: CommutativeGroup[Double]

    Permalink
  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. def negate(x: Double): Double

    Permalink
    Definition Classes
    DoubleAlgebraAdditiveGroup
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def one: Double

    Permalink
    Definition Classes
    DoubleAlgebraMultiplicativeMonoid
  27. def plus(x: Double, y: Double): Double

    Permalink
    Definition Classes
    DoubleAlgebraAdditiveSemigroup
  28. def positivePow(a: Double, n: Int): Double

    Permalink
    Attributes
    protected[this]
    Definition Classes
    MultiplicativeSemigroup
  29. def positiveSumN(a: Double, n: Int): Double

    Permalink
    Attributes
    protected[this]
    Definition Classes
    AdditiveSemigroup
  30. def pow(x: Double, y: Int): Double

    Permalink
  31. def product(as: TraversableOnce[Double]): Double

    Permalink

    Given a sequence of as, compute the product.

    Given a sequence of as, compute the product.

    Definition Classes
    MultiplicativeMonoid
  32. def quot(x: Double, y: Double): Double

    Permalink
    Definition Classes
    DoubleAlgebraEuclideanRing
  33. def quotmod(x: Double, y: Double): (Double, Double)

    Permalink
    Definition Classes
    DoubleAlgebraEuclideanRing
  34. def reciprocal(x: Double): Double

    Permalink
    Definition Classes
    DoubleAlgebraMultiplicativeGroup
  35. def sum(as: TraversableOnce[Double]): Double

    Permalink

    Given a sequence of as, compute the sum.

    Given a sequence of as, compute the sum.

    Definition Classes
    AdditiveMonoid
  36. def sumN(a: Double, n: Int): Double

    Permalink
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def times(x: Double, y: Double): Double

    Permalink
    Definition Classes
    DoubleAlgebraMultiplicativeSemigroup
  39. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  40. def tryProduct(as: TraversableOnce[Double]): Option[Double]

    Permalink

    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
  41. def trySum(as: TraversableOnce[Double]): Option[Double]

    Permalink

    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
  42. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. def zero: Double

    Permalink
    Definition Classes
    DoubleAlgebraAdditiveMonoid

Inherited from Field[Double]

Inherited from MultiplicativeGroup[Double]

Inherited from EuclideanRing[Double]

Inherited from CommutativeRing[Double]

Inherited from CommutativeRig[Double]

Inherited from Ring[Double]

Inherited from Rng[Double]

Inherited from AdditiveGroup[Double]

Inherited from Rig[Double]

Inherited from MultiplicativeMonoid[Double]

Inherited from Semiring[Double]

Inherited from AdditiveMonoid[Double]

Inherited from AdditiveSemigroup[Double]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped