QuotientMonoid

com.alecdorrington.scalgebra.arithmetic.QuotientMonoid

A typeclass for algebraic values with the following features:

  • Associative multiplication
  • Multiplicative identity (1)
  • Division

Attributes

Graph
Supertypes
trait Quotient[X]
trait Algebra[X]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Semifield[X]
trait Field[X]
trait NormedField[X, S]
trait OrderedField[X]
trait ArchimedeanField[X]
trait NormedSemifield[X, S]
trait OrderedSemifield[X]
trait QuotientSemiring[X]
trait QuotientRing[X]
trait NormedQuotientRing[X, S]
trait NormedQuotientMonoid[X, S]
Show all

Members list

Value members

Inherited and Abstract methods

def one: X

The unique multiplicative identity in this algebra. Typically given by values such as 1 or 1.0F.

The unique multiplicative identity in this algebra. Typically given by values such as 1 or 1.0F.

Attributes

Inherited from:
MultiplicativeIdentity

Extensions

Inherited extensions

extension (x: X)
inline def isOne: Boolean

Attributes

Returns

true if and only if x equals one.

Inherited from:
MultiplicativeIdentity
inline def nonOne: Boolean

Attributes

Returns

true if and only if x doesn't equal one.

Inherited from:
MultiplicativeIdentity
extension (x: X)
infix inline def **(n: Int): X

An alias for pow.

An alias for pow.

Attributes

Inherited from:
MultiplicativeSemigroup
extension (x: X)
override def pow(n: Int): X

Computes x raised to the power of n, for any non-negative integer n.

Computes x raised to the power of n, for any non-negative integer n.

Attributes

Throws
IllegalArgumentException

if n < 0.

Definition Classes
Inherited from:
MultiplicativeMonoid
extension (xs: Iterable[X])
inline def productOrOne: X

Computes the product of all values in xs, i.e. xs₁ × xs₂ × …, or else one if xs is empty.

Computes the product of all values in xs, i.e. xs₁ × xs₂ × …, or else one if xs is empty.

Attributes

Inherited from:
MultiplicativeMonoid
extension (xs: Iterable[X])
inline def productFrom(x: X): X

Computes the product of x and all values in xs, i.e. x × xs₁ × xs₂ × ….

Computes the product of x and all values in xs, i.e. x × xs₁ × xs₂ × ….

Attributes

Inherited from:
MultiplicativeSemigroup
inline def productOption: Option[X]

Computes the product of all values in xs, i.e. xs₁ × xs₂ × …, or else None if xs is empty.

Computes the product of all values in xs, i.e. xs₁ × xs₂ × …, or else None if xs is empty.

Attributes

Inherited from:
MultiplicativeSemigroup
inline def productOrElse[Y >: X](default: Y): Y

Computes the product of all values in xs, i.e. xs₁ × xs₂ × …, or else default if xs is empty.

Computes the product of all values in xs, i.e. xs₁ × xs₂ × …, or else default if xs is empty.

Attributes

Inherited from:
MultiplicativeSemigroup

Inherited and Abstract extensions

extension (x: X)
infix inline def /(y: X): X

An alias for div.

An alias for div.

Attributes

Inherited from:
Quotient
def div(y: X): X

Computes the quotient between a dividend x and a divisor y, i.e. x / y.

Computes the quotient between a dividend x and a divisor y, i.e. x / y.

Attributes

Throws
ArithmeticException

if y == zero.

See also
Note

For imprecise (e.g. integer) arithmetic, the result is rounded towards zero.

Inherited from:
Quotient
extension (x: X)
infix inline def *(y: X): X

An alias for mul.

An alias for mul.

Attributes

Inherited from:
MultiplicativeMagma
def mul(y: X): X

Computes the product of two values x and y, i.e. x × y.

Computes the product of two values x and y, i.e. x × y.

Attributes

Inherited from:
MultiplicativeMagma