LeftModule

A left module is a generalization of a vector space over a field, where the scalars are the elements of a ring (not necessarily commutative).

A left module has left multiplication by scalars. Let V be an abelian group (with additive notation) and R the scalar ring, we have the following laws for x, y in V and r, s in R:

 1. r *: (x + y) = r *: x + r *: y
 2. (r + s) *: x = r *: x + s *: x
 3. (r * s) *: x = r *: (s *: x)
 4. R.one * x = x

(see https://en.wikipedia.org/wiki/Module_(mathematics) )

Type parameters:
R

Scalar type

V

Abelian group type

Companion:
object
trait CModule[V, R]
trait ZAlgebra[V]
trait VectorSpace[V, F]
trait InnerProductSpace[V, F]
trait CoordinateSpace[V, F]
class SeqCoordinateSpace[A, SA]
trait NormedVectorSpace[V, F]
trait DistVectorSpace[V, K]
class MapVectorSpace[K, V]
class SeqVectorSpace[A, SA]
trait DistCModule[V, K]
class MapCRng[K, V]
class SeqCModule[A, SA]

Value members

Abstract methods

def timesl(r: R, v: V): V

Inherited methods

def isZero(a: V)(implicit ev: Eq[V]): Boolean

Tests if a is zero.

Tests if a is zero.

Inherited from:
AdditiveMonoid
def minus(x: V, y: V): V
Inherited from:
AdditiveGroup
def negate(x: V): V
Inherited from:
AdditiveGroup
def plus(x: V, y: V): V
Inherited from:
AdditiveSemigroup
@nowarn("msg=deprecated")
def sum(as: IterableOnce[V]): V

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Inherited from:
AdditiveMonoid
override def sumN(a: V, n: Int): V
Definition Classes
Inherited from:
AdditiveGroup
@nowarn("msg=deprecated")
override def trySum(as: IterableOnce[V]): Option[V]
Definition Classes
Inherited from:
AdditiveMonoid
def zero: V
Inherited from:
AdditiveMonoid

Implicits

Implicits

implicit def scalar: Ring[R]