IntAlgebra

@SerialVersionUID(0L)
class IntAlgebra extends IntIsEuclideanRing with IntIsNRoot with IntIsReal with Serializable
trait IntIsReal
trait IntSigned
trait IntOrder
trait forCommutativeRing[Int]
trait forAdditiveCommutativeGroup[Int]
trait forAdditiveCommutativeMonoid[Int]
trait TruncatedDivision[Int]
trait IsIntegral[Int]
trait IsRational[Int]
trait IsAlgebraic[Int]
trait IsReal[Int]
trait Signed[Int]
trait Order[Int]
trait PartialOrder[Int]
trait Eq[Int]
trait NRoot[Int]
trait EuclideanRing[Int]
trait GCDRing[Int]
trait CommutativeRing[Int]
trait CommutativeRng[Int]
trait CommutativeRig[Int]
trait MultiplicativeCommutativeMonoid[Int]
trait CommutativeSemiring[Int]
trait MultiplicativeCommutativeSemigroup[Int]
trait Ring[Int]
trait Rng[Int]
trait AdditiveCommutativeGroup[Int]
trait AdditiveGroup[Int]
trait Rig[Int]
trait MultiplicativeMonoid[Int]
trait Semiring[Int]
trait MultiplicativeSemigroup[Int]
trait AdditiveCommutativeMonoid[Int]
trait AdditiveCommutativeSemigroup[Int]
trait AdditiveMonoid[Int]
trait AdditiveSemigroup[Int]
trait Serializable
class Object
trait Matchable
class Any

Value members

Inherited methods

override
def abs(a: Int): Int
Definition Classes
IntSigned -> Signed
Inherited from
IntSigned
override
def additive: CommutativeGroup[Int]
Definition Classes
AdditiveCommutativeGroup -> AdditiveCommutativeMonoid -> AdditiveCommutativeSemigroup -> AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveCommutativeGroup
final override
def additiveCommutativeMonoid: AdditiveCommutativeMonoid[Int]
Definition Classes
forAdditiveCommutativeMonoid -> Signed
Inherited from
forAdditiveCommutativeMonoid
def ceil(a: Int): Int
Inherited from
IsIntegral
def compare(x: Int, y: Int): Int
Inherited from
IntOrder
def comparison(x: Int, y: Int): Comparison

Like compare, but returns a cats.kernel.Comparison instead of an Int. Has the benefit of being able to pattern match on, but not as performant.

Like compare, but returns a cats.kernel.Comparison instead of an Int. Has the benefit of being able to pattern match on, but not as performant.

Inherited from
Order
def emod(a: Int, b: Int): Int
Inherited from
IntIsEuclideanRing
def equot(a: Int, b: Int): Int
Inherited from
IntIsEuclideanRing
override
def equotmod(a: Int, b: Int): (Int, Int)
Definition Classes
IntIsEuclideanRing -> EuclideanRing
Inherited from
IntIsEuclideanRing
override
def eqv(x: Int, y: Int): Boolean
Definition Classes
IntOrder -> Order -> PartialOrder -> Eq
Inherited from
IntOrder
def euclideanFunction(a: Int): BigInt
Inherited from
IntIsEuclideanRing
def floor(a: Int): Int
Inherited from
IsIntegral
def fmod(x: Int, y: Int): Int
Inherited from
forCommutativeRing
def fpow(a: Int, b: Int): Int
Inherited from
IntIsNRoot
def fquot(x: Int, y: Int): Int
Inherited from
forCommutativeRing
override
def fquotmod(x: Int, y: Int): (Int, Int)
Definition Classes
forCommutativeRing -> TruncatedDivision
Inherited from
forCommutativeRing
def fromBigInt(n: BigInt): Int

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's one, or -n summations of -one if n is negative.

Most type class instances should consider overriding this method for performance reasons.

Inherited from
Ring
override
def fromInt(n: Int): Int
Definition Classes
Inherited from
IntIsEuclideanRing
override
def gcd(a: Int, b: Int)(implicit ev: Eq[Int]): Int
Definition Classes
IntIsEuclideanRing -> EuclideanRing -> GCDRing
Inherited from
IntIsEuclideanRing
override
def gt(x: Int, y: Int): Boolean
Definition Classes
IntOrder -> Order -> PartialOrder
Inherited from
IntOrder
override
def gteqv(x: Int, y: Int): Boolean
Definition Classes
IntOrder -> Order -> PartialOrder
Inherited from
IntOrder
def isOne(a: Int)(implicit ev: Eq[Int]): Boolean

Tests if a is one.

Tests if a is one.

Inherited from
MultiplicativeMonoid
def isSignNegative(a: Int): Boolean
Inherited from
Signed
def isSignNonNegative(a: Int): Boolean
Inherited from
Signed
def isSignNonPositive(a: Int): Boolean
Inherited from
Signed
def isSignNonZero(a: Int): Boolean
Inherited from
Signed
def isSignPositive(a: Int): Boolean
Inherited from
Signed
def isSignZero(a: Int): Boolean
Inherited from
Signed
def isWhole(a: Int): Boolean
Inherited from
IsIntegral
def isZero(a: Int)(implicit ev: Eq[Int]): Boolean

Tests if a is zero.

Tests if a is zero.

Inherited from
AdditiveMonoid
override
def lcm(a: Int, b: Int)(implicit ev: Eq[Int]): Int
Definition Classes
IntIsEuclideanRing -> EuclideanRing -> GCDRing
Inherited from
IntIsEuclideanRing
def log(a: Int): Int
Inherited from
IntIsNRoot
override
def lt(x: Int, y: Int): Boolean
Definition Classes
IntOrder -> Order -> PartialOrder
Inherited from
IntOrder
override
def lteqv(x: Int, y: Int): Boolean
Definition Classes
IntOrder -> Order -> PartialOrder
Inherited from
IntOrder
def max(x: Int, y: Int): Int

If x > y, return x, else return y.

If x > y, return x, else return y.

Inherited from
Order
def min(x: Int, y: Int): Int

If x < y, return x, else return y.

If x < y, return x, else return y.

Inherited from
Order
override
def minus(a: Int, b: Int): Int
Definition Classes
IntIsEuclideanRing -> AdditiveGroup
Inherited from
IntIsEuclideanRing
override
def multiplicative: CommutativeMonoid[Int]
Definition Classes
MultiplicativeCommutativeMonoid -> MultiplicativeCommutativeSemigroup -> MultiplicativeMonoid -> MultiplicativeSemigroup
Inherited from
MultiplicativeCommutativeMonoid
def negate(a: Int): Int
Inherited from
IntIsEuclideanRing
override
def neqv(x: Int, y: Int): Boolean
Definition Classes
IntOrder -> Order -> Eq
Inherited from
IntOrder
def nroot(x: Int, n: Int): Int
Inherited from
IntIsNRoot
def one: Int
Inherited from
IntIsEuclideanRing
def order: Order[Int]
Inherited from
IntIsReal
def partialCompare(x: Int, y: Int): Double
Inherited from
Order
def partialComparison(x: Int, y: Int): Option[Comparison]

Like partialCompare, but returns a cats.kernel.Comparison instead of an Double. Has the benefit of being able to pattern match on, but not as performant.

Like partialCompare, but returns a cats.kernel.Comparison instead of an Double. Has the benefit of being able to pattern match on, but not as performant.

Inherited from
PartialOrder
def plus(a: Int, b: Int): Int
Inherited from
IntIsEuclideanRing
def pmax(x: Int, y: Int): Option[Int]

Returns Some(x) if x >= y, Some(y) if x < y, otherwise None.

Returns Some(x) if x >= y, Some(y) if x < y, otherwise None.

Inherited from
PartialOrder
def pmin(x: Int, y: Int): Option[Int]

Returns Some(x) if x <= y, Some(y) if x > y, otherwise None.

Returns Some(x) if x <= y, Some(y) if x > y, otherwise None.

Inherited from
PartialOrder
override
def pow(a: Int, b: Int): Int
Definition Classes
IntIsEuclideanRing -> MultiplicativeMonoid -> MultiplicativeSemigroup
Inherited from
IntIsEuclideanRing
@nowarn("msg=deprecated")
def product(as: IterableOnce[Int]): Int

Given a sequence of as, compute the product.

Given a sequence of as, compute the product.

Inherited from
MultiplicativeMonoid
def round(a: Int): Int
Inherited from
IsIntegral
def sign(a: Int): Sign

Returns Zero if a is 0, Positive if a is positive, and Negative is a is negative.

Returns Zero if a is 0, Positive if a is positive, and Negative is a is negative.

Inherited from
Signed
override
def signum(a: Int): Int
Definition Classes
IntSigned -> Signed
Inherited from
IntSigned
def sqrt(a: Int): Int
Inherited from
NRoot
@nowarn("msg=deprecated")
def sum(as: IterableOnce[Int]): Int

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Inherited from
AdditiveMonoid
override
def sumN(a: Int, n: Int): Int
Definition Classes
AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveGroup
override
def times(a: Int, b: Int): Int
Definition Classes
IntIsEuclideanRing -> MultiplicativeSemigroup
Inherited from
IntIsEuclideanRing
def tmod(x: Int, y: Int): Int
Inherited from
IntTruncatedDivision
def toAlgebraic(a: Int): Algebraic
Inherited from
IsRational
def toBigInt(n: Int): BigInt
Inherited from
IntIsReal
def toBigIntOpt(x: Int): Opt[BigInt]
Inherited from
IntTruncatedDivision
def toDouble(n: Int): Double
Inherited from
IntIsReal
def toOrdering: Ordering[Int]

Convert a Order[A] to a scala.math.Ordering[A] instance.

Convert a Order[A] to a scala.math.Ordering[A] instance.

Inherited from
Order
def toRational(a: Int): Rational
Inherited from
IsIntegral
def toReal(a: Int): Real
Inherited from
IsAlgebraic
def tquot(x: Int, y: Int): Int
Inherited from
IntTruncatedDivision
def tquotmod(x: Int, y: Int): (Int, Int)
Inherited from
TruncatedDivision
def tryCompare(x: Int, y: Int): Option[Int]

Result of comparing x with y. Returns None if operands are not comparable. If operands are comparable, returns Some[Int] where the Int sign is:

Result of comparing x with y. Returns None if operands are not comparable. If operands are comparable, returns Some[Int] where the Int sign is:

  • negative iff x < y
  • zero iff x = y
  • positive iff x > y
Inherited from
PartialOrder
@nowarn("msg=deprecated")
override
def tryProduct(as: IterableOnce[Int]): Option[Int]
Definition Classes
MultiplicativeMonoid -> MultiplicativeSemigroup
Inherited from
MultiplicativeMonoid
@nowarn("msg=deprecated")
override
def trySum(as: IterableOnce[Int]): Option[Int]
Definition Classes
AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveMonoid
def zero: Int
Inherited from
IntIsEuclideanRing