public class NormOps_DDRM
extends java.lang.Object
Norms are a measure of the size of a vector or a matrix. One typical application is in error analysis.
Vector norms have the following properties:
Matrix norms can be induced from vector norms as is shown below:
A_{M} = max_{x≠0}Ax_{v}/x_{v}
where ._{M} is the induced matrix norm for the vector norm ._{v}.
By default implementations that try to mitigate overflow/underflow are used. If the word fast is found before a function's name that means it does not mitigate those issues, but runs a bit faster.
Constructor and Description 

NormOps_DDRM() 
Modifier and Type  Method and Description 

static double 
conditionP(DMatrixRMaj A,
double p)
The condition number of a matrix is used to measure the sensitivity of the linear
system Ax=b.

static double 
conditionP2(DMatrixRMaj A)
The condition p = 2 number of a matrix is used to measure the sensitivity of the linear
system Ax=b.

static double 
elementP(DMatrix1Row A,
double p)
Element wise pnorm:
norm = {∑_{i=1:m} ∑_{j=1:n} { a_{ij}^{p}}}^{1/p} 
static double 
fastElementP(DMatrixD1 A,
double p)
Same as
elementP(org.ejml.data.DMatrix1Row, double) but runs faster by not mitigating overflow/underflow related problems. 
static double 
fastNormF(DMatrixD1 a)
This implementation of the Frobenius norm is a straight forward implementation and can
be susceptible for overflow/underflow issues.

static double 
fastNormP(DMatrixRMaj A,
double p)
An unsafe but faster version of
normP(org.ejml.data.DMatrixRMaj, double) that calls routines which are faster
but more prone to overflow/underflow problems. 
static double 
fastNormP2(DMatrixRMaj A)
Computes the p=2 norm.

static double 
inducedP1(DMatrixRMaj A)
Computes the induced p = 1 matrix norm.
A_{1}= max(j=1 to n; sum(i=1 to m; a_{ij})) 
static double 
inducedP2(DMatrixRMaj A)
Computes the induced p = 2 matrix norm, which is the largest singular value.

static double 
inducedPInf(DMatrixRMaj A)
Induced matrix p = infinity norm.
A_{∞} = max(i=1 to m; sum(j=1 to n; a_{ij})) 
static void 
normalizeF(DMatrixRMaj A)
Normalizes the matrix such that the Frobenius norm is equal to one.

static double 
normF(DMatrixD1 a)
Computes the Frobenius matrix norm:
normF = Sqrt{ ∑_{i=1:m} ∑_{j=1:n} { a_{ij}^{2}} } 
static double 
normP(DMatrixRMaj A,
double p)
Computes either the vector pnorm or the induced matrix pnorm depending on A
being a vector or a matrix respectively.

static double 
normP1(DMatrixRMaj A)
Computes the p=1 norm.

static double 
normP2(DMatrixRMaj A)
Computes the p=2 norm.

static double 
normPInf(DMatrixRMaj A)
Computes the p=∞ norm.

public static void normalizeF(DMatrixRMaj A)
A
 The matrix that is to be normalized.public static double conditionP(DMatrixRMaj A, double p)
The condition number of a matrix is used to measure the sensitivity of the linear
system Ax=b. A value near one indicates that it is a well conditioned matrix.
κ_{p} = A_{p}A^{1}_{p}
If the matrix is not square then the condition of either A^{T}A or AA^{T} is computed.
A
 The matrix.p
 pnormpublic static double conditionP2(DMatrixRMaj A)
The condition p = 2 number of a matrix is used to measure the sensitivity of the linear
system Ax=b. A value near one indicates that it is a well conditioned matrix.
κ_{2} = A_{2}A^{1}_{2}
This is also known as the spectral condition number.
A
 The matrix.public static double fastNormF(DMatrixD1 a)
This implementation of the Frobenius norm is a straight forward implementation and can
be susceptible for overflow/underflow issues. A more resilient implementation is
normF(org.ejml.data.DMatrixD1)
.
a
 The matrix whose norm is computed. Not modified.public static double normF(DMatrixD1 a)
Computes the Frobenius matrix norm:
normF = Sqrt{ ∑_{i=1:m} ∑_{j=1:n} { a_{ij}^{2}} }
This is equivalent to the element wise p=2 norm. See fastNormF(org.ejml.data.DMatrixD1)
for another implementation
that is faster, but more prone to underflow/overflow errors.
a
 The matrix whose norm is computed. Not modified.public static double elementP(DMatrix1Row A, double p)
Element wise pnorm:
norm = {∑_{i=1:m} ∑_{j=1:n} { a_{ij}^{p}}}^{1/p}
This is not the same as the induced pnorm used on matrices, but is the same as the vector pnorm.
A
 Matrix. Not modified.p
 p value.public static double fastElementP(DMatrixD1 A, double p)
elementP(org.ejml.data.DMatrix1Row, double)
but runs faster by not mitigating overflow/underflow related problems.A
 Matrix. Not modified.p
 p value.public static double normP(DMatrixRMaj A, double p)
A
 Vector or matrix whose norm is to be computed.p
 The p value of the pnorm.public static double fastNormP(DMatrixRMaj A, double p)
normP(org.ejml.data.DMatrixRMaj, double)
that calls routines which are faster
but more prone to overflow/underflow problems.A
 Vector or matrix whose norm is to be computed.p
 The p value of the pnorm.public static double normP1(DMatrixRMaj A)
A
 Matrix or vector.public static double normP2(DMatrixRMaj A)
A
 Matrix or vector.public static double fastNormP2(DMatrixRMaj A)
A
 Matrix or vector.public static double normPInf(DMatrixRMaj A)
A
 Matrix or vector.public static double inducedP1(DMatrixRMaj A)
Computes the induced p = 1 matrix norm.
A_{1}= max(j=1 to n; sum(i=1 to m; a_{ij}))
A
 Matrix. Not modified.public static double inducedP2(DMatrixRMaj A)
Computes the induced p = 2 matrix norm, which is the largest singular value.
A
 Matrix. Not modified.public static double inducedPInf(DMatrixRMaj A)
Induced matrix p = infinity norm.
A_{∞} = max(i=1 to m; sum(j=1 to n; a_{ij}))
A
 A matrix.
Copyright © 20092018 Peter Abeles