SeqLpNormedVectorSpace

@SerialVersionUID(0L)
class SeqLpNormedVectorSpace[A, SA <: SeqOps[A, Seq, SA]](val p: Int)(implicit evidence$3: Field[A], evidence$4: NRoot[A], evidence$5: Signed[A], cbf: Factory[A, SA]) extends SeqVectorSpace[A, SA] with NormedVectorSpace[SA, A] with Serializable

The L_p norm is equal to the p-th root of the sum of each element to the power p. For instance, if p = 1 we have the Manhattan distance. If you'd like the Euclidean norm (p = 2), then you'd probably be best to use an RealInnerProductSpace instead.

trait NormedVectorSpace[SA, A]
trait MetricSpace[SA, A]
class SeqVectorSpace[A, SA]
trait VectorSpace[SA, A]
class SeqCModule[A, SA]
trait CModule[SA, A]
trait RightModule[SA, A]
trait LeftModule[SA, A]
trait AdditiveCommutativeGroup[SA]
trait AdditiveCommutativeMonoid[SA]
trait AdditiveCommutativeSemigroup[SA]
trait AdditiveGroup[SA]
trait AdditiveMonoid[SA]
trait AdditiveSemigroup[SA]
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

def norm(v: SA): A

Inherited methods

override
def additive: CommutativeGroup[SA]
Definition Classes
AdditiveCommutativeGroup -> AdditiveCommutativeMonoid -> AdditiveCommutativeSemigroup -> AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveCommutativeGroup
def distance(v: SA, w: SA): A
Inherited from
NormedVectorSpace
def divr(v: SA, f: A): SA
Inherited from
VectorSpace
def isZero(a: SA)(implicit ev: Eq[SA]): Boolean

Tests if a is zero.

Tests if a is zero.

Inherited from
AdditiveMonoid
override
def minus(x: SA, y: SA): SA
Definition Classes
SeqCModule -> AdditiveGroup
Inherited from
SeqCModule
def negate(sa: SA): SA
Inherited from
SeqCModule
def normalize(v: SA): SA
Inherited from
NormedVectorSpace
def plus(x: SA, y: SA): SA
Inherited from
SeqCModule
@nowarn("msg=deprecated")
def sum(as: IterableOnce[SA]): SA

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Inherited from
AdditiveMonoid
override
def sumN(a: SA, n: Int): SA
Definition Classes
AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveGroup
def timesl(r: A, sa: SA): SA
Inherited from
SeqCModule
override
def timesr(v: SA, r: A): SA
Definition Classes
Inherited from
CModule
@nowarn("msg=deprecated")
override
def trySum(as: IterableOnce[SA]): Option[SA]
Definition Classes
AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveMonoid
def zero: SA
Inherited from
SeqCModule

Concrete fields

val p: Int

Implicits

Inherited implicits

implicit override
val scalar: Field[A]
Inherited from
SeqVectorSpace