LongAlgebra

@SerialVersionUID(0L)
class LongAlgebra extends LongIsEuclideanRing with LongIsNRoot with LongIsReal with Serializable
trait LongOrder
trait TruncatedDivision[Long]
trait IsIntegral[Long]
trait IsRational[Long]
trait IsAlgebraic[Long]
trait IsReal[Long]
trait Signed[Long]
trait Order[Long]
trait PartialOrder[Long]
trait Eq[Long]
trait NRoot[Long]
trait EuclideanRing[Long]
trait GCDRing[Long]
trait CommutativeRing[Long]
trait CommutativeRng[Long]
trait CommutativeRig[Long]
trait MultiplicativeCommutativeMonoid[Long]
trait CommutativeSemiring[Long]
trait MultiplicativeCommutativeSemigroup[Long]
trait Ring[Long]
trait Rng[Long]
trait AdditiveCommutativeGroup[Long]
trait AdditiveGroup[Long]
trait Rig[Long]
trait MultiplicativeMonoid[Long]
trait Semiring[Long]
trait MultiplicativeSemigroup[Long]
trait AdditiveCommutativeMonoid[Long]
trait AdditiveCommutativeSemigroup[Long]
trait AdditiveMonoid[Long]
trait AdditiveSemigroup[Long]
trait Serializable
class Object
trait Matchable
class Any

Value members

Inherited methods

override
def abs(a: Long): Long
Definition Classes
Inherited from
LongSigned
override
def additive: CommutativeGroup[Long]
Definition Classes
AdditiveCommutativeGroup -> AdditiveCommutativeMonoid -> AdditiveCommutativeSemigroup -> AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveCommutativeGroup
def ceil(a: Long): Long
Inherited from
IsIntegral
def compare(x: Long, y: Long): Int
Inherited from
LongOrder
def comparison(x: Long, y: Long): 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: Long, b: Long): Long
Inherited from
LongIsEuclideanRing
def equot(a: Long, b: Long): Long
Inherited from
LongIsEuclideanRing
override
def equotmod(a: Long, b: Long): (Long, Long)
Definition Classes
Inherited from
LongIsEuclideanRing
override
def eqv(x: Long, y: Long): Boolean
Definition Classes
LongOrder -> Order -> PartialOrder -> Eq
Inherited from
LongOrder
def euclideanFunction(a: Long): BigInt
Inherited from
LongIsEuclideanRing
def floor(a: Long): Long
Inherited from
IsIntegral
def fmod(x: Long, y: Long): Long
def fpow(a: Long, b: Long): Long
Inherited from
LongIsNRoot
def fquot(x: Long, y: Long): Long
override
def fquotmod(x: Long, y: Long): (Long, Long)
def fromBigInt(n: BigInt): Long

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): Long
Definition Classes
Inherited from
LongIsEuclideanRing
def gcd(a: Long, b: Long)(implicit ev: Eq[Long]): Long
Inherited from
LongIsEuclideanRing
override
def gt(x: Long, y: Long): Boolean
Definition Classes
LongOrder -> Order -> PartialOrder
Inherited from
LongOrder
override
def gteqv(x: Long, y: Long): Boolean
Definition Classes
LongOrder -> Order -> PartialOrder
Inherited from
LongOrder
def isOne(a: Long)(implicit ev: Eq[Long]): Boolean

Tests if a is one.

Tests if a is one.

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

Tests if a is zero.

Tests if a is zero.

Inherited from
AdditiveMonoid
def lcm(a: Long, b: Long)(implicit ev: Eq[Long]): Long
Inherited from
LongIsEuclideanRing
def log(a: Long): Long
Inherited from
LongIsNRoot
override
def lt(x: Long, y: Long): Boolean
Definition Classes
LongOrder -> Order -> PartialOrder
Inherited from
LongOrder
override
def lteqv(x: Long, y: Long): Boolean
Definition Classes
LongOrder -> Order -> PartialOrder
Inherited from
LongOrder
def max(x: Long, y: Long): Long

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

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

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

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

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

Inherited from
Order
override
def minus(a: Long, b: Long): Long
Definition Classes
LongIsEuclideanRing -> AdditiveGroup
Inherited from
LongIsEuclideanRing
override
def multiplicative: CommutativeMonoid[Long]
Definition Classes
MultiplicativeCommutativeMonoid -> MultiplicativeCommutativeSemigroup -> MultiplicativeMonoid -> MultiplicativeSemigroup
Inherited from
MultiplicativeCommutativeMonoid
def negate(a: Long): Long
Inherited from
LongIsEuclideanRing
override
def neqv(x: Long, y: Long): Boolean
Definition Classes
LongOrder -> Order -> Eq
Inherited from
LongOrder
def nroot(x: Long, n: Int): Long
Inherited from
LongIsNRoot
def one: Long
Inherited from
LongIsEuclideanRing
def partialCompare(x: Long, y: Long): Double
Inherited from
Order
def partialComparison(x: Long, y: Long): 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: Long, b: Long): Long
Inherited from
LongIsEuclideanRing
def pmax(x: Long, y: Long): Option[Long]

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: Long, y: Long): Option[Long]

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: Long, b: Int): Long
Definition Classes
LongIsEuclideanRing -> MultiplicativeMonoid -> MultiplicativeSemigroup
Inherited from
LongIsEuclideanRing
def product(as: IterableOnce[Long]): Long

Given a sequence of as, compute the product.

Given a sequence of as, compute the product.

Inherited from
MultiplicativeMonoid
def round(a: Long): Long
Inherited from
IsIntegral
def sign(a: Long): 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: Long): Int
Definition Classes
Inherited from
LongSigned
def sqrt(a: Long): Long
Inherited from
NRoot
def sum(as: IterableOnce[Long]): Long

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

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

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: Long): Rational
Inherited from
IsIntegral
def toReal(a: Long): Real
Inherited from
IsAlgebraic
def tquot(x: Long, y: Long): Long
Inherited from
LongTruncatedDivision
def tquotmod(x: Long, y: Long): (Long, Long)
Inherited from
TruncatedDivision
def tryCompare(x: Long, y: Long): 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
override
def tryProduct(as: IterableOnce[Long]): Option[Long]
Definition Classes
MultiplicativeMonoid -> MultiplicativeSemigroup
Inherited from
MultiplicativeMonoid
override
def trySum(as: IterableOnce[Long]): Option[Long]
Definition Classes
AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveMonoid
def zero: Long
Inherited from
LongIsEuclideanRing