Ops

com.alecdorrington.scalgebra.normed.NormedAdditiveSemigroup.Ops
trait Ops extends Ops, Ops

Attributes

Graph
Supertypes
trait Ops
trait Ops
class Object
trait Matchable
class Any
Known subtypes
trait Ops
trait Ops
trait Ops
trait Ops
trait Ops
trait Ops
trait Ops
object NormedField
object NormedRing
trait Ops
trait Ops
trait Ops
trait Ops
trait Ops
Show all

Members list

Value members

Inherited methods

inline def add[X](x: X, y: X)(using X: AdditiveSemigroup[X]): X

Computes the sum of two values x and y, i.e. x + y.

Computes the sum of two values x and y, i.e. x + y.

Attributes

Note

All implementations must be associative, i.e. (x + y) + z == x + (y + z).

Inherited from:
Ops
inline def length[X, S](x: X)(using ev: Normed[X, S]): S

Attributes

Inherited from:
Ops
inline def scale[X](x: X, n: Int)(using X: AdditiveSemigroup[X]): X

Computes x multiplied by n, for any strictly positive n.

Computes x multiplied by n, for any strictly positive n.

Attributes

Throws
IllegalArgumentException

if n ≤ 0.

Inherited from:
Ops
inline def sum[X](x: X, xs: X*)(using X: AdditiveSemigroup[X]): X

Computes the sum of x and all values in xs, i.e. x + xs₁ + xs₂ + ….

Computes the sum of x and all values in xs, i.e. x + xs₁ + xs₂ + ….

Attributes

Inherited from:
Ops
inline def sumOption[X](xs: Iterable[X])(using X: AdditiveSemigroup[X]): Option[X]

Computes the sum of all values in xs, i.e. xs₁ + xs₂ + …, or else None if xs is empty.

Computes the sum of all values in xs, i.e. xs₁ + xs₂ + …, or else None if xs is empty.

Attributes

Inherited from:
Ops