l1-norm ( k -- x ) - Factor Documentation

l1-norm ( k -- x )
Matrix operations



Vocabulary
math .vectors

Inputs
k a sequence


Outputs
x a non-negative real number


Generic word contract
Computes the norm (size) of k in l1 (L^1) vector space, usually written ∥・∥1.

Examples
USING: math.vectors prettyprint ; { 1 2 3 4 } l1-norm .
10


See also
norm-sq , norm , l-infinity-norm , p-norm

Definition
USING: math sequences ;

IN: math.vectors

: l1-norm ( k -- x ) [ abs ] map-sum ; inline

AltStyle によって変換されたページ (->オリジナル) /