trait CommutativeRing[A] extends Ring[A] with CommutativeRig[A] with CommutativeRng[A]
CommutativeRing is a Ring that is commutative under multiplication.
- Alphabetic
- By Inheritance
- CommutativeRing
- CommutativeRng
- CommutativeRig
- MultiplicativeCommutativeMonoid
- CommutativeSemiring
- MultiplicativeCommutativeSemigroup
- Ring
- Rng
- AdditiveCommutativeGroup
- AdditiveGroup
- Rig
- MultiplicativeMonoid
- Semiring
- MultiplicativeSemigroup
- AdditiveCommutativeMonoid
- AdditiveCommutativeSemigroup
- AdditiveMonoid
- AdditiveSemigroup
- Serializable
- Serializable
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
getClass(): Class[_]
- Definition Classes
- Any
-
abstract
def
negate(x: A): A
- Definition Classes
- AdditiveGroup
-
abstract
def
one: A
- Definition Classes
- MultiplicativeMonoid
-
abstract
def
plus(x: A, y: A): A
- Definition Classes
- AdditiveSemigroup
-
abstract
def
times(x: A, y: A): A
- Definition Classes
- MultiplicativeSemigroup
-
abstract
def
zero: A
- Definition Classes
- AdditiveMonoid
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
def
additive: CommutativeGroup[A]
- Definition Classes
- AdditiveCommutativeGroup → AdditiveCommutativeMonoid → AdditiveCommutativeSemigroup → AdditiveGroup → AdditiveMonoid → AdditiveSemigroup
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
equals(arg0: Any): Boolean
- Definition Classes
- Any
-
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'sone
, or-n
summations of-one
ifn
is negative.Most type class instances should consider overriding this method for performance reasons.
- Definition Classes
- Ring
-
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'sone
, or-n
summations of-one
ifn
is negative.Most type class instances should consider overriding this method for performance reasons.
- Definition Classes
- Ring
-
def
hashCode(): Int
- Definition Classes
- Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isOne(a: A)(implicit ev: Eq[A]): Boolean
Tests if
a
is one.Tests if
a
is one.- Definition Classes
- MultiplicativeMonoid
-
def
isZero(a: A)(implicit ev: Eq[A]): Boolean
Tests if
a
is zero.Tests if
a
is zero.- Definition Classes
- AdditiveMonoid
-
def
minus(x: A, y: A): A
- Definition Classes
- AdditiveGroup
-
def
multiplicative: CommutativeMonoid[A]
- Definition Classes
- MultiplicativeCommutativeMonoid → MultiplicativeCommutativeSemigroup → MultiplicativeMonoid → MultiplicativeSemigroup
-
def
positivePow(a: A, n: Int): A
- Attributes
- protected[this]
- Definition Classes
- MultiplicativeSemigroup
-
def
positiveSumN(a: A, n: Int): A
- Attributes
- protected[this]
- Definition Classes
- AdditiveSemigroup
-
def
pow(a: A, n: Int): A
- Definition Classes
- MultiplicativeMonoid → MultiplicativeSemigroup
-
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
-
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
-
def
sumN(a: A, n: Int): A
- Definition Classes
- AdditiveGroup → AdditiveMonoid → AdditiveSemigroup
-
def
toString(): String
- Definition Classes
- Any
-
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
- MultiplicativeMonoid → MultiplicativeSemigroup
-
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
- AdditiveMonoid → AdditiveSemigroup