Trait/Object

algebra.ring

EuclideanRing

Related Docs: object EuclideanRing | package ring

Permalink

trait EuclideanRing[A] extends CommutativeRing[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).

The idea is that 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

This type does not provide access to the Euclidean function, but only provides the quot, mod, and quotmod operators.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EuclideanRing
  2. CommutativeRing
  3. CommutativeRig
  4. MultiplicativeCommutativeMonoid
  5. MultiplicativeCommutativeSemigroup
  6. Ring
  7. Rng
  8. AdditiveCommutativeGroup
  9. AdditiveGroup
  10. Rig
  11. MultiplicativeMonoid
  12. Semiring
  13. MultiplicativeSemigroup
  14. AdditiveCommutativeMonoid
  15. AdditiveCommutativeSemigroup
  16. AdditiveMonoid
  17. AdditiveSemigroup
  18. Serializable
  19. Serializable
  20. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def getClass(): Class[_]

    Permalink
    Definition Classes
    Any
  2. abstract def mod(a: A, b: A): A

    Permalink
  3. abstract def negate(x: A): A

    Permalink
    Definition Classes
    AdditiveGroup
  4. abstract def one: A

    Permalink
    Definition Classes
    MultiplicativeMonoid
  5. abstract def plus(x: A, y: A): A

    Permalink
    Definition Classes
    AdditiveSemigroup
  6. abstract def quot(a: A, b: A): A

    Permalink
  7. abstract def times(x: A, y: A): A

    Permalink
    Definition Classes
    MultiplicativeSemigroup
  8. abstract def zero: A

    Permalink
    Definition Classes
    AdditiveMonoid

Concrete Value Members

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

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

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

    Permalink
    Definition Classes
    Any
  4. def additive: CommutativeGroup[A]

    Permalink
  5. final def asInstanceOf[T0]: T0

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

    Permalink
    Definition Classes
    Any
  7. def fromInt(n: Int): A

    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
    Ring
  8. def hashCode(): Int

    Permalink
    Definition Classes
    Any
  9. final def isInstanceOf[T0]: Boolean

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

    Permalink

    Tests if a is one.

    Tests if a is one.

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

    Permalink

    Tests if a is zero.

    Tests if a is zero.

    Definition Classes
    AdditiveMonoid
  12. def minus(x: A, y: A): A

    Permalink
    Definition Classes
    AdditiveGroup
  13. def multiplicative: CommutativeMonoid[A]

    Permalink
  14. def positivePow(a: A, n: Int): A

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

    Permalink
    Attributes
    protected[this]
    Definition Classes
    AdditiveSemigroup
  16. def pow(a: A, n: Int): A

    Permalink
  17. def product(as: TraversableOnce[A]): A

    Permalink

    Given a sequence of as, compute the product.

    Given a sequence of as, compute the product.

    Definition Classes
    MultiplicativeMonoid
  18. def quotmod(a: A, b: A): (A, A)

    Permalink
  19. def sum(as: TraversableOnce[A]): A

    Permalink

    Given a sequence of as, compute the sum.

    Given a sequence of as, compute the sum.

    Definition Classes
    AdditiveMonoid
  20. def sumN(a: A, n: Int): A

    Permalink
  21. def toString(): String

    Permalink
    Definition Classes
    Any
  22. def tryProduct(as: TraversableOnce[A]): Option[A]

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

    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
    AdditiveSemigroup

Inherited from CommutativeRing[A]

Inherited from CommutativeRig[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 AdditiveCommutativeSemigroup[A]

Inherited from AdditiveMonoid[A]

Inherited from AdditiveSemigroup[A]

Inherited from Serializable

Inherited from Serializable

Inherited from Any

Ungrouped