NormedVectorSpace

trait NormedVectorSpace[V, @specialized(Int, Long, Float, Double) F] extends VectorSpace[V, F] with MetricSpace[V, F]

A normed vector space is a vector space equipped with a function norm: V => F. The main constraint is that the norm of a vector must be scaled linearly when the vector is scaled; that is norm(k *: v) == k.abs * norm(v). Additionally, a normed vector space is also a MetricSpace, where distance(v, w) = norm(v - w), and so must obey the triangle inequality.

An example of a normed vector space is R^n equipped with the euclidean vector length as the norm.

Companion
object
trait MetricSpace[V, F]
trait VectorSpace[V, F]
trait CModule[V, F]
trait RightModule[V, F]
trait LeftModule[V, F]
trait AdditiveCommutativeGroup[V]
trait AdditiveCommutativeMonoid[V]
trait AdditiveCommutativeSemigroup[V]
trait AdditiveGroup[V]
trait AdditiveMonoid[V]
trait AdditiveSemigroup[V]
trait Serializable
class Any

Value members

Abstract methods

def norm(v: V): F

Concrete methods

def distance(v: V, w: V): F
def normalize(v: V): V

Inherited methods

override
def additive: CommutativeGroup[V]
Definition Classes
AdditiveCommutativeGroup -> AdditiveCommutativeMonoid -> AdditiveCommutativeSemigroup -> AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveCommutativeGroup
def divr(v: V, f: F): V
Inherited from
VectorSpace
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
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
AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveGroup
def timesl(r: F, v: V): V
Inherited from
LeftModule
override
def timesr(v: V, r: F): V
Definition Classes
Inherited from
CModule
override
def trySum(as: IterableOnce[V]): Option[V]
Definition Classes
AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveMonoid
def zero: V
Inherited from
AdditiveMonoid

Implicits

Inherited implicits

implicit
def scalar: Field[F]
Inherited from
VectorSpace