CommutativeRig

trait CommutativeRig[@specialized(Int, Long, Float, Double) A] extends Rig[A] with CommutativeSemiring[A] with MultiplicativeCommutativeMonoid[A]

CommutativeRig is a Rig that is commutative under multiplication.

CommutativeRig is a Rig that is commutative under multiplication.

Companion
object

Value members

Inherited methods

override def additive: CommutativeMonoid[A]
def isOne(a: A)(ev: Eq[A]): Boolean

Tests if a is one.

Tests if a is one.

Inherited from
MultiplicativeMonoid
def isZero(a: A)(ev: Eq[A]): Boolean

Tests if a is zero.

Tests if a is zero.

Inherited from
AdditiveMonoid
def one: A
Inherited from
MultiplicativeMonoid
def plus(x: A, y: A): A
Inherited from
AdditiveSemigroup
override def pow(a: A, n: Int): A
def product(as: IterableOnce[A]): A

Given a sequence of as, compute the product.

Given a sequence of as, compute the product.

Inherited from
MultiplicativeMonoid
def sum(as: IterableOnce[A]): A

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Inherited from
AdditiveMonoid
override def sumN(a: A, n: Int): A
Definition Classes
Inherited from
AdditiveMonoid
def times(x: A, y: A): A
override def tryProduct(as: IterableOnce[A]): Option[A]
override def trySum(as: IterableOnce[A]): Option[A]
Definition Classes
Inherited from
AdditiveMonoid
def zero: A
Inherited from
AdditiveMonoid