spire.algebra

Ring

trait Ring[A] extends Rig[A] with Rng[A]

Ring represents a set (A) that is a group over addition (+) and a monoid over multiplication (*). Aside from this, the multiplication must distribute over addition.

Ring implements some methods (for example fromInt) in terms of other more fundamental methods (zero, one and plus). Where possible, these methods should be overridden by more efficient implementations.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Ring
  2. Rng
  3. AdditiveAbGroup
  4. AdditiveCMonoid
  5. AdditiveCSemigroup
  6. AdditiveGroup
  7. Rig
  8. MultiplicativeMonoid
  9. Semiring
  10. MultiplicativeSemigroup
  11. AdditiveMonoid
  12. AdditiveSemigroup
  13. AnyRef
  14. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def negate(x: A): A

    Definition Classes
    AdditiveGroup
  2. abstract def one: A

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

    Definition Classes
    AdditiveSemigroup
  4. abstract def times(x: A, y: A): A

    Definition Classes
    MultiplicativeSemigroup
  5. abstract def zero: A

    Definition Classes
    AdditiveMonoid

Concrete 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: AbGroup[A]

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def fromInt(n: Int): A

    Defined to be equivalent to additive.sumn(one, n).

    Defined to be equivalent to additive.sumn(one, n). That is, n repeated summations of this ring's one, or -one if n is negative.

  11. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  14. def minus(x: A, y: A): A

    Definition Classes
    AdditiveGroup
  15. def multiplicative: Monoid[A]

  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. def pow(a: A, n: Int): A

    This is similar to Semigroup#pow, except that a pow 0 is defined to be the multiplicative identity.

    This is similar to Semigroup#pow, except that a pow 0 is defined to be the multiplicative identity.

    Definition Classes
    RigSemiring
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. def toString(): String

    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Rng[A]

Inherited from AdditiveAbGroup[A]

Inherited from AdditiveCMonoid[A]

Inherited from AdditiveCSemigroup[A]

Inherited from AdditiveGroup[A]

Inherited from Rig[A]

Inherited from MultiplicativeMonoid[A]

Inherited from Semiring[A]

Inherited from MultiplicativeSemigroup[A]

Inherited from AdditiveMonoid[A]

Inherited from AdditiveSemigroup[A]

Inherited from AnyRef

Inherited from Any

Ungrouped