CommutativeRing

object CommutativeRing extends RingFunctions[[A] =>> CommutativeRing[A]]
Companion
class

Value members

Concrete methods

@inline
final def apply[A](r: CommutativeRing[A]): CommutativeRing[A]

Inherited methods

final def defaultFromBigInt[@specialized(Int, Long, Float, Double) A](n: BigInt)(ev: CommutativeRing[A]): A
Inherited from
RingFunctions
final def defaultFromDouble[A](a: Double)(ringA: Ring[A], mgA: MultiplicativeGroup[A]): A

Returns the given Double, understood as a rational number, in the provided (division) ring.

Returns the given Double, understood as a rational number, in the provided (division) ring.

This is implemented in terms of basic ops. However, this is probably significantly less efficient than can be done with a specific type. So, it is recommended to specialize this general method.

Inherited from
RingFunctions
def fromBigInt[@specialized(Int, Long, Float, Double) A](n: BigInt)(ev: CommutativeRing[A]): A
Inherited from
RingFunctions
def fromInt[@specialized(Int, Long, Float, Double) A](n: Int)(ev: CommutativeRing[A]): A
Inherited from
RingFunctions
def isOne[@specialized(Int, Long, Float, Double) A](a: A)(ev0: CommutativeRing[A], ev1: Eq[A]): Boolean
def isZero[@specialized(Int, Long, Float, Double) A](a: A)(ev0: CommutativeRing[A], ev1: Eq[A]): Boolean
def minus[@specialized(Int, Long, Float, Double) A](x: A, y: A)(ev: CommutativeRing[A]): A
def negate[@specialized(Int, Long, Float, Double) A](x: A)(ev: CommutativeRing[A]): A
def one[@specialized(Int, Long, Float, Double) A](ev: CommutativeRing[A]): A
def plus[@specialized(Int, Long, Float, Double) A](x: A, y: A)(ev: CommutativeRing[A]): A
def pow[@specialized(Int, Long, Float, Double) A](a: A, n: Int)(ev: CommutativeRing[A]): A
def product[@specialized(Int, Long, Float, Double) A](as: IterableOnce[A])(ev: CommutativeRing[A]): A
def sum[@specialized(Int, Long, Float, Double) A](as: IterableOnce[A])(ev: CommutativeRing[A]): A
def sumN[@specialized(Int, Long, Float, Double) A](a: A, n: Int)(ev: CommutativeRing[A]): A
def times[@specialized(Int, Long, Float, Double) A](x: A, y: A)(ev: CommutativeRing[A]): A
def tryProduct[A](as: IterableOnce[A])(ev: CommutativeRing[A]): Option[A]
def trySum[A](as: IterableOnce[A])(ev: CommutativeRing[A]): Option[A]
def zero[@specialized(Int, Long, Float, Double) A](ev: CommutativeRing[A]): A