trait EuclideanRing[A] extends GCDRing[A]

EuclideanRing implements a Euclidean domain.

The formal definition says that every euclidean domain A has (at least one) euclidean function f: A -> N (the natural numbers) where:

(for every x and non-zero y) x = yq + r, and r = 0 or f(r) < f(y).

This generalizes the Euclidean division of integers, where f represents a measure of length (or absolute value), and the previous equation represents finding the quotient and remainder of x and y. So:

quot(x, y) = q mod(x, y) = r

Self Type
EuclideanRing[A]
Source
EuclideanRing.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EuclideanRing
  2. GCDRing
  3. CommutativeRing
  4. CommutativeRng
  5. CommutativeRig
  6. MultiplicativeCommutativeMonoid
  7. CommutativeSemiring
  8. MultiplicativeCommutativeSemigroup
  9. Ring
  10. Rng
  11. AdditiveCommutativeGroup
  12. AdditiveGroup
  13. Rig
  14. MultiplicativeMonoid
  15. Semiring
  16. MultiplicativeSemigroup
  17. AdditiveCommutativeMonoid
  18. AdditiveCommutativeSemigroup
  19. AdditiveMonoid
  20. AdditiveSemigroup
  21. Serializable
  22. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def emod(a: A, b: A): A
  2. abstract def equot(a: A, b: A): A
  3. abstract def euclideanFunction(a: A): BigInt
  4. abstract def getClass(): Class[_ <: AnyRef]
    Definition Classes
    Any
  5. abstract def negate(x: A): A
    Definition Classes
    AdditiveGroup
  6. abstract def one: A
    Definition Classes
    MultiplicativeMonoid
  7. abstract def plus(x: A, y: A): A
    Definition Classes
    AdditiveSemigroup
  8. abstract def times(x: A, y: A): A
    Definition Classes
    MultiplicativeSemigroup
  9. abstract def zero: A
    Definition Classes
    AdditiveMonoid

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. def additive: CommutativeGroup[A]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def equals(arg0: Any): Boolean
    Definition Classes
    Any
  7. def equotmod(a: A, b: A): (A, A)
  8. def fromBigInt(n: BigInt): A

    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
    Ring
  9. def fromInt(n: Int): A

    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
    Ring
  10. def gcd(a: A, b: A)(implicit ev: Eq[A]): A
    Definition Classes
    EuclideanRingGCDRing
  11. def hashCode(): Int
    Definition Classes
    Any
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def isOne(a: A)(implicit ev: Eq[A]): Boolean

    Tests if a is one.

    Tests if a is one.

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

    Tests if a is zero.

    Tests if a is zero.

    Definition Classes
    AdditiveMonoid
  15. def lcm(a: A, b: A)(implicit ev: Eq[A]): A
    Definition Classes
    EuclideanRingGCDRing
  16. def minus(x: A, y: A): A
    Definition Classes
    AdditiveGroup
  17. def multiplicative: CommutativeMonoid[A]
  18. def positivePow(a: A, n: Int): A
    Attributes
    protected[this]
    Definition Classes
    MultiplicativeSemigroup
  19. def positiveSumN(a: A, n: Int): A
    Attributes
    protected[this]
    Definition Classes
    AdditiveSemigroup
  20. def pow(a: A, n: Int): A
  21. def product(as: TraversableOnce[A]): A

    Given a sequence of as, compute the product.

    Given a sequence of as, compute the product.

    Definition Classes
    MultiplicativeMonoid
    Annotations
    @nowarn()
  22. def sum(as: TraversableOnce[A]): A

    Given a sequence of as, compute the sum.

    Given a sequence of as, compute the sum.

    Definition Classes
    AdditiveMonoid
    Annotations
    @nowarn()
  23. def sumN(a: A, n: Int): A
  24. def toString(): String
    Definition Classes
    Any
  25. def tryProduct(as: TraversableOnce[A]): Option[A]

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

    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()

Inherited from GCDRing[A]

Inherited from CommutativeRing[A]

Inherited from CommutativeRng[A]

Inherited from CommutativeRig[A]

Inherited from CommutativeSemiring[A]

Inherited from Ring[A]

Inherited from Rng[A]

Inherited from AdditiveCommutativeGroup[A]

Inherited from AdditiveGroup[A]

Inherited from Rig[A]

Inherited from MultiplicativeMonoid[A]

Inherited from Semiring[A]

Inherited from MultiplicativeSemigroup[A]

Inherited from AdditiveCommutativeMonoid[A]

Inherited from AdditiveMonoid[A]

Inherited from AdditiveSemigroup[A]

Inherited from Serializable

Inherited from Any

Ungrouped