Class NormOps_FDRM
@Generated("org.ejml.dense.row.NormOps_DDRM") public class NormOps_FDRM extends 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: x > 0 if x ≠ 0 and 0 = 0
 αx = α x
 x+y ≤ x + y
 A > 0 if A ≠ 0 where A ∈ ℜ ^{m × n}
  α A  = α A where A ∈ ℜ ^{m × n}
 A+B ≤ A + B where A and B are ∈ ℜ ^{m × n}
 AB ≤ A B where A and B are ∈ ℜ ^{m × m}
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 Summary
Constructors Constructor Description NormOps_FDRM()

Method Summary
Modifier and Type Method Description static float
conditionP(FMatrixRMaj A, float p)
The condition number of a matrix is used to measure the sensitivity of the linear system Ax=b.static float
conditionP2(FMatrixRMaj A)
The condition p = 2 number of a matrix is used to measure the sensitivity of the linear system Ax=b.static float
elementP(FMatrix1Row A, float p)
Element wise pnorm:
norm = {∑_{i=1:m} ∑_{j=1:n} { a_{ij}^{p}}}^{1/p}static float
fastElementP(FMatrixD1 A, float p)
Same aselementP(org.ejml.data.FMatrix1Row, float)
but runs faster by not mitigating overflow/underflow related problems.static float
fastNormF(FMatrixD1 a)
This implementation of the Frobenius norm is a straight forward implementation and can be susceptible for overflow/underflow issues.static float
fastNormP(FMatrixRMaj A, float p)
An unsafe but faster version ofnormP(org.ejml.data.FMatrixRMaj, float)
that calls routines which are faster but more prone to overflow/underflow problems.static float
fastNormP2(FMatrixRMaj A)
Computes the p=2 norm.static float
inducedP1(FMatrixRMaj A)
Computes the induced p = 1 matrix norm.
A_{1}= max(j=1 to n; sum(i=1 to m; a_{ij}))static float
inducedP2(FMatrixRMaj A)
Computes the induced p = 2 matrix norm, which is the largest singular value.static float
inducedPInf(FMatrixRMaj A)
Induced matrix p = infinity norm.
A_{∞} = max(i=1 to m; sum(j=1 to n; a_{ij}))static void
normalizeF(FMatrixRMaj A)
Normalizes the matrix such that the Frobenius norm is equal to one.static float
normF(FMatrixD1 a)
Computes the Frobenius matrix norm:
normF = Sqrt{ ∑_{i=1:m} ∑_{j=1:n} { a_{ij}^{2}} }static float
normP(FMatrixRMaj A, float p)
Computes either the vector pnorm or the induced matrix pnorm depending on A being a vector or a matrix respectively.static float
normP1(FMatrixRMaj A)
Computes the p=1 norm.static float
normP2(FMatrixRMaj A)
Computes the p=2 norm.static float
normPInf(FMatrixRMaj A)
Computes the p=∞ norm.

Constructor Details

NormOps_FDRM
public NormOps_FDRM()


Method Details

normalizeF
Normalizes the matrix such that the Frobenius norm is equal to one. Parameters:
A
 The matrix that is to be normalized.

conditionP
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.
 Parameters:
A
 The matrix.p
 pnorm Returns:
 The condition number.

conditionP2
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.
 Parameters:
A
 The matrix. Returns:
 The condition number.

fastNormF
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.FMatrixD1)
. Parameters:
a
 The matrix whose norm is computed. Not modified.

normF
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.FMatrixD1)
for another implementation that is faster, but more prone to underflow/overflow errors. Parameters:
a
 The matrix whose norm is computed. Not modified. Returns:
 The norm's value.

elementP
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.
 Parameters:
A
 Matrix. Not modified.p
 p value. Returns:
 The norm's value.

fastElementP
Same aselementP(org.ejml.data.FMatrix1Row, float)
but runs faster by not mitigating overflow/underflow related problems. Parameters:
A
 Matrix. Not modified.p
 p value. Returns:
 The norm's value.

normP
Computes either the vector pnorm or the induced matrix pnorm depending on A being a vector or a matrix respectively. Parameters:
A
 Vector or matrix whose norm is to be computed.p
 The p value of the pnorm. Returns:
 The computed norm.

fastNormP
An unsafe but faster version ofnormP(org.ejml.data.FMatrixRMaj, float)
that calls routines which are faster but more prone to overflow/underflow problems. Parameters:
A
 Vector or matrix whose norm is to be computed.p
 The p value of the pnorm. Returns:
 The computed norm.

normP1
Computes the p=1 norm. If A is a matrix then the induced norm is computed. Parameters:
A
 Matrix or vector. Returns:
 The norm.

normP2
Computes the p=2 norm. If A is a matrix then the induced norm is computed. Parameters:
A
 Matrix or vector. Returns:
 The norm.

fastNormP2
Computes the p=2 norm. If A is a matrix then the induced norm is computed. This implementation is faster, but more prone to buffer overflow or underflow problems. Parameters:
A
 Matrix or vector. Returns:
 The norm.

normPInf
Computes the p=∞ norm. If A is a matrix then the induced norm is computed. Parameters:
A
 Matrix or vector. Returns:
 The norm.

inducedP1
Computes the induced p = 1 matrix norm.
A_{1}= max(j=1 to n; sum(i=1 to m; a_{ij})) Parameters:
A
 Matrix. Not modified. Returns:
 The norm.

inducedP2
Computes the induced p = 2 matrix norm, which is the largest singular value.
 Parameters:
A
 Matrix. Not modified. Returns:
 The norm.

inducedPInf
Induced matrix p = infinity norm.
A_{∞} = max(i=1 to m; sum(j=1 to n; a_{ij})) Parameters:
A
 A matrix. Returns:
 the norm.
