trait DivisionRing[A] extends Ring[A] with Semifield[A]
- Alphabetic
- By Inheritance
- DivisionRing
- Semifield
- MultiplicativeGroup
- Ring
- Rng
- AdditiveCommutativeGroup
- AdditiveGroup
- Rig
- MultiplicativeMonoid
- Semiring
- MultiplicativeSemigroup
- AdditiveCommutativeMonoid
- AdditiveCommutativeSemigroup
- AdditiveMonoid
- AdditiveSemigroup
- Serializable
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def div(x: A, y: A): A
- Definition Classes
- MultiplicativeGroup
- abstract def getClass(): Class[_ <: AnyRef]
- 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 fromDouble(a: Double): A
This is implemented in terms of basic Ring ops.
This is implemented in terms of basic Ring ops. However, this is probably significantly less efficient than can be done with a specific type. So, it is recommended that this method be overriden.
This is possible because a Double is a rational number.
- 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: Group[A]
- Definition Classes
- MultiplicativeGroup → 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
- MultiplicativeGroup → 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
- Annotations
- @nowarn()
- def reciprocal(x: A): A
- Definition Classes
- MultiplicativeGroup
- 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
- Annotations
- @nowarn()
- 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
- Annotations
- @nowarn()
- 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
- Annotations
- @nowarn()