OrderedDifferenceMonoidOps

com.alecdorrington.scalgebra.ordered.ops.OrderedDifferenceMonoidOps

Extension methods for OrderedDifferenceMonoid.

Attributes

Experimental
true
Graph
Supertypes
Known subtypes

Members list

Value members

Inherited methods

final inline def zero[X](using X: AdditiveIdentity[X]): X

The unique representation of the additive identity (0) in this algebra system. Typically corresponds to values such as 0, 0.0F, or Seq.empty.

The unique representation of the additive identity (0) in this algebra system. Typically corresponds to values such as 0, 0.0F, or Seq.empty.

Attributes

Inherited from:
AdditiveIdentityOps

Extensions

Inherited extensions

extension [X](x: X)(using X: Ordering[X])
infix inline def <(y: X): Boolean

Attributes

Returns

true if the left operand is smaller than the right.

Inherited from:
OrderingOps
infix inline def <=(y: X): Boolean

Attributes

Returns

true if the left operand is not larger than the right.

Inherited from:
OrderingOps
infix inline def >(y: X): Boolean

Attributes

Returns

true if the right operand is larger than the left.

Inherited from:
OrderingOps
infix inline def >=(y: X): Boolean

Attributes

Returns

true if the right operand is not larger than the left.

Inherited from:
OrderingOps
inline def clamp(lb: X, ub: X): X

Clamps this value to the inclusive range [lb, ub].

Clamps this value to the inclusive range [lb, ub].

Attributes

Returns

lb if this value is less than lb, ub if greater than ub, or this value otherwise.

Inherited from:
OrderingOps
def compare(y: X): Int

Determines the relative order of both operands

Determines the relative order of both operands

Attributes

Returns

-1 if in-order (this < x), 1 if out-of-order (this > x), and 0 if equal (this == x).

Inherited from:
OrderingOps
infix inline def max(y: X): X

Attributes

Returns

the larger of both operands.

Inherited from:
OrderingOps
infix inline def min(y: X): X

Attributes

Returns

the smaller of both operands.

Inherited from:
OrderingOps
extension [X](x: X)(using X: AdditiveIdentity[X])
inline def isZero: Boolean

Attributes

Returns

true if this value equals zero.

Inherited from:
AdditiveIdentityOps
extension [X](x: X)(using X: AdditiveSemigroup[X])
infix inline def *:(n: Int): X

Multiplies this value on the left by a strictly positive integer.

Multiplies this value on the left by a strictly positive integer.

Attributes

Throws
IllegalArgumentException

if n ≤ 0.

Inherited from:
AdditiveSemigroupOps
infix inline def +(y: X): X

Computes the sum of both operands.

Computes the sum of both operands.

Attributes

Inherited from:
AdditiveSemigroupOps
infix inline def :*(n: Int): X

Multiplies this value on the right by a strictly positive integer.

Multiplies this value on the right by a strictly positive integer.

Attributes

Throws
IllegalArgumentException

if n ≤ 0.

Inherited from:
AdditiveSemigroupOps
extension [X](x: X)(using X: DifferenceMonoid[X])
infix inline def -(y: X): X

Computes the difference between both operands.

Computes the difference between both operands.

Attributes

Inherited from:
DifferenceMonoidOps
extension [X](x: X)(using X: AdditiveMonoid[X])
infix inline def *:(n: Int): X

Multiplies this value on the left by a non-negative integer.

Multiplies this value on the left by a non-negative integer.

Attributes

Throws
IllegalArgumentException

if n < 0.

Inherited from:
AdditiveMonoidOps
infix inline def :*(n: Int): X

Multiplies this value on the right by a non-negative integer.

Multiplies this value on the right by a non-negative integer.

Attributes

Throws
IllegalArgumentException

if n < 0.

Inherited from:
AdditiveMonoidOps