Handbook
Glossary
matrix-p-q-norm ( m p q -- n )
Matrix operations
Prev:
matrix-p-norm ( m p -- n )
Next:
l1-norm ( k -- x )
Vocabulary
math
.
matrices
Inputs
m
a
matrix
p
a positive real number
q
a positive real number
Outputs
n
a non-negative real number
Word description
Find the norm (size) of a matrix in
L^p,q
vector space.
This is the matrix norm for any
p, q ∈ ℝ
. It is still an entry-wise norm, like
matrix-p-norm-entrywise
, and is not an induced or Schatten norm.
Examples
Equivalent to
l2-norm
for
p = q = 2
:
USING: math.matrices prettyprint ; { { 1 1 } { 1 1 } } 2 2 matrix-p-q-norm .
2.0
See also
matrix-l1-norm
,
matrix-l2-norm
,
matrix-l-infinity-norm
,
matrix-p-norm
Definition
USING:
kernel
math
math.functions
sequences
;
IN:
math.matrices
::
matrix-p-q-norm
( m p q -- n )
m
dup
zero-matrix?
[
drop
0
]
[
[
[
sq
]
map-sum
q p
/
^
]
map-sum
q
recip
^
]
if
;
inline
foldable
flushable