AdditiveGroupOps

com.alecdorrington.scalgebra.ops.AdditiveGroupOps

Extension methods for AdditiveGroup.

Attributes

Experimental
true
Graph
Supertypes
class Object
trait Matchable
class Any
Show all
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

Extensions

extension [X](x: X)(using X: AdditiveGroup[X])
infix inline def *:(n: Int): X

Multiplies this value on the left by any integer.

Multiplies this value on the left by any integer.

Attributes

infix inline def :*(n: Int): X

Multiplies this value on the right by any integer.

Multiplies this value on the right by any integer.

Attributes

extension [X](x: X)(using A: AdditiveGroup[X], O: Ordering[X])
inline def abs: X

Computes the absolute value of this value.

Computes the absolute value of this value.

Attributes

Inherited extensions

extension [X](x: X)(using X: AdditiveInverse[X])
inline def unary_-: X

Computes the additive inverse (negative) of this value.

Computes the additive inverse (negative) of this value.

Attributes

Inherited from:
AdditiveInverseOps
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