Matrix norms

Main header file

Subroutines

The following routines can return either \(\|A\|_1\), \(\|A\|_\infty\), \(\|A\|_F\) (the Frobenius norm), the maximum entrywise norm, \(\|A\|_2\), or \(\|A\|_*\) (the nuclear/trace norm) of fully-populated matrices.

General

Compute a norm of a fully-populated or implicitly symmetric/Hermitian (with the data stored in the specified triangle) matrix.

C++ API

Base<F> Norm(const Matrix<F> &A, NormType type = FROBENIUS_NORM)
Base<F> Norm(const AbstractDistMatrix<F> &A, NormType type = FROBENIUS_NORM)
Base<F> SymmetricNorm(UpperOrLower uplo, const Matrix<F> &A, NormType type = FROBENIUS_NORM)
Base<F> SymmetricNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A, NormType type = FROBENIUS_NORM)
Base<F> HermitianNorm(UpperOrLower uplo, const Matrix<F> &A, NormType type = FROBENIUS_NORM)
Base<F> HermitianNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A, NormType type = FROBENIUS_NORM)

C API

ElError ElNorm_s(ElConstMatrix_s A, ElNormType type, float* norm)
ElError ElNorm_d(ElConstMatrix_d A, ElNormType type, double* norm)
ElError ElNorm_c(ElConstMatrix_c A, ElNormType type, float* norm)
ElError ElNorm_z(ElConstMatrix_z A, ElNormType type, double* norm)
ElError ElNormDist_s(ElConstDistMatrix_s A, ElNormType type, float* norm)
ElError ElNormDist_d(ElConstDistMatrix_d A, ElNormType type, double* norm)
ElError ElNormDist_c(ElConstDistMatrix_c A, ElNormType type, float* norm)
ElError ElNormDist_z(ElConstDistMatrix_z A, ElNormType type, double* norm)
ElError ElSymmetricNorm_s(ElUpperOrLower uplo, ElConstMatrix_s A, ElNormType type, float* norm)
ElError ElSymmetricNorm_d(ElUpperOrLower uplo, ElConstMatrix_d A, ElNormType type, double* norm)
ElError ElSymmetricNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, ElNormType type, float* norm)
ElError ElSymmetricNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, ElNormType type, double* norm)
ElError ElSymmetricNormDist_s(ElUpperOrLower uplo, ElConstDistMatrix_s A, ElNormType type, float* norm)
ElError ElSymmetricNormDist_d(ElUpperOrLower uplo, ElConstDistMatrix_d A, ElNormType type, double* norm)
ElError ElSymmetricNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, ElNormType type, float* norm)
ElError ElSymmetricNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, ElNormType type, double* norm)
ElError ElHermitianNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, ElNormType type, float* norm)
ElError ElHermitianNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, ElNormType type, double* norm)
ElError ElHermitianNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, ElNormType type, float* norm)
ElError ElHermitianNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, ElNormType type, double* norm)

Entrywise

The following routines return the \(\ell_p\) norm of the columns of A stacked into a single vector, i.e., \(\| \text{vec}(A) \|_p\). Note that the Frobenius norm corresponds to the \(p=2\) case.

C++ API

Base<F> EntrywiseNorm(const Matrix<F> &A, Base<F> p = 1)
Base<F> EntrywiseNorm(const AbstractDistMatrix<F> &A, Base<F> p = 1)
Base<F> EntrywiseNorm(const SparseMatrix<F> &A, Base<F> p = 1)
Base<F> EntrywiseNorm(const DistSparseMatrix<F> &A, Base<F> p = 1)
Base<F> SymmetricEntrywiseNorm(UpperOrLower uplo, const Matrix<F> &A, Base<F> p = 1)
Base<F> SymmetricEntrywiseNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A, Base<F> p = 1)
Base<F> SymmetricEntrywiseNorm(UpperOrLower uplo, const SparseMatrix<F> &A, Base<F> p = 1)
Base<F> SymmetricEntrywiseNorm(UpperOrLower uplo, const DistSparseMatrix<F> &A, Base<F> p = 1)
Base<F> HermitianEntrywiseNorm(UpperOrLower uplo, const Matrix<F> &A, Base<F> p = 1)
Base<F> HermitianEntrywiseNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A, Base<F> p = 1)
Base<F> HermitianEntrywiseNorm(UpperOrLower uplo, const SparseMatrix<F> &A, Base<F> p = 1)
Base<F> HermitianEntrywiseNorm(UpperOrLower uplo, const DistSparseMatrix<F> &A, Base<F> p = 1)

C API

ElError ElEntrywiseNorm_s(ElConstMatrix_s A, float p, float* norm)
ElError ElEntrywiseNorm_d(ElConstMatrix_d A, double p, double* norm)
ElError ElEntrywiseNorm_c(ElConstMatrix_c A, float p, float* norm)
ElError ElEntrywiseNorm_z(ElConstMatrix_z A, double p, double* norm)
ElError ElEntrywiseNormDist_s(ElConstDistMatrix_s A, float p, float* norm)
ElError ElEntrywiseNormDist_d(ElConstDistMatrix_d A, double p, double* norm)
ElError ElEntrywiseNormDist_c(ElConstDistMatrix_c A, float p, float* norm)
ElError ElEntrywiseNormDist_z(ElConstDistMatrix_z A, double p, double* norm)
ElError ElSymmetricEntrywiseNorm_s(ElUpperOrLower uplo, ElConstMatrix_s A, float p, float* norm)
ElError ElSymmetricEntrywiseNorm_d(ElUpperOrLower uplo, ElConstMatrix_d A, double p, double* norm)
ElError ElSymmetricEntrywiseNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float p, float* norm)
ElError ElSymmetricEntrywiseNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double p, double* norm)
ElError ElSymmetricEntrywiseNormDist_s(ElUpperOrLower uplo, ElConstDistMatrix_s A, float p, float* norm)
ElError ElSymmetricEntrywiseNormDist_d(ElUpperOrLower uplo, ElConstDistMatrix_d A, double p, double* norm)
ElError ElSymmetricEntrywiseNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float p, float* norm)
ElError ElSymmetricEntrywiseNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double p, double* norm)
ElError ElHermitianEntrywiseNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float p, float* norm)
ElError ElHermitianEntrywiseNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double p, double* norm)
ElError ElHermitianEntrywiseNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float p, float* norm)
ElError ElHermitianEntrywiseNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double p, double* norm)

Frobenius norm

The following routines return the \(\ell_2\) norm of the singular values (the Schatten norm with \(p=2\)), which can be cheaply computed as the \(\ell_2\) norm of \(\text{vec}(A)\).

C++ API

Base<F> FrobeniusNorm(const Matrix<F> &A)
Base<F> FrobeniusNorm(const AbstractDistMatrix<F> &A)
Base<F> FrobeniusNorm(const SparseMatrix<F> &A)
Base<F> FrobeniusNorm(const DistSparseMatrix<F> &A)
Base<F> SymmetricFrobeniusNorm(UpperOrLower uplo, const Matrix<F> &A)
Base<F> SymmetricFrobeniusNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A)
Base<F> SymmetricFrobeniusNorm(UpperOrLower uplo, const SparseMatrix<F> &A)
Base<F> SymmetricFrobeniusNorm(UpperOrLower uplo, const DistSparseMatrix<F> &A)
Base<F> HermitianFrobeniusNorm(UpperOrLower uplo, const Matrix<F> &A)
Base<F> HermitianFrobeniusNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A)
Base<F> HermitianFrobeniusNorm(UpperOrLower uplo, const SparseMatrix<F> &A)
Base<F> HermitianFrobeniusNorm(UpperOrLower uplo, const DistSparseMatrix<F> &A)

C API

ElError ElFrobeniusNorm_s(ElConstMatrix_s A, float* norm)
ElError ElFrobeniusNorm_d(ElConstMatrix_d A, double* norm)
ElError ElFrobeniusNorm_c(ElConstMatrix_c A, float* norm)
ElError ElFrobeniusNorm_z(ElConstMatrix_z A, double* norm)
ElError ElFrobeniusNormDist_s(ElConstDistMatrix_s A, float* norm)
ElError ElFrobeniusNormDist_d(ElConstDistMatrix_d A, double* norm)
ElError ElFrobeniusNormDist_c(ElConstDistMatrix_c A, float* norm)
ElError ElFrobeniusNormDist_z(ElConstDistMatrix_z A, double* norm)
ElError ElSymmetricFrobeniusNorm_s(ElUpperOrLower uplo, ElConstMatrix_s A, float* norm)
ElError ElSymmetricFrobeniusNorm_d(ElUpperOrLower uplo, ElConstMatrix_d A, double* norm)
ElError ElSymmetricFrobeniusNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float* norm)
ElError ElSymmetricFrobeniusNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double* norm)
ElError ElSymmetricFrobeniusNormDist_s(ElUpperOrLower uplo, ElConstDistMatrix_s A, float* norm)
ElError ElSymmetricFrobeniusNormDist_d(ElUpperOrLower uplo, ElConstDistMatrix_d A, double* norm)
ElError ElSymmetricFrobeniusNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float* norm)
ElError ElSymmetricFrobeniusNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double* norm)
ElError ElHermitianFrobeniusNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float* norm)
ElError ElHermitianFrobeniusNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double* norm)
ElError ElHermitianFrobeniusNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float* norm)
ElError ElHermitianFrobeniusNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double* norm)

Ky-Fan norm

The following routines compute the sum of the largest k singular values.

C++ API

Base<F> KyFanNorm(const Matrix<F> &A, Int k)
Base<F> KyFanNorm(const AbstractDistMatrix<F> &A, Int k)
Base<F> SymmetricKyFanNorm(UpperOrLower uplo, const Matrix<F> &A, Int k)
Base<F> SymmetricKyFanNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A, Int k)
Base<F> HermitianKyFanNorm(UpperOrLower uplo, const Matrix<F> &A, Int k)
Base<F> HermitianKyFanNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A, Int k)

C API

ElError ElKyFanNorm_s(ElConstMatrix_s A, ElInt k, float* norm)
ElError ElKyFanNorm_d(ElConstMatrix_d A, ElInt k, double* norm)
ElError ElKyFanNorm_c(ElConstMatrix_c A, ElInt k, float* norm)
ElError ElKyFanNorm_z(ElConstMatrix_z A, ElInt k, double* norm)
ElError ElKyFanNormDist_s(ElConstDistMatrix_s A, ElInt k, float* norm)
ElError ElKyFanNormDist_d(ElConstDistMatrix_d A, ElInt k, double* norm)
ElError ElKyFanNormDist_c(ElConstDistMatrix_c A, ElInt k, float* norm)
ElError ElKyFanNormDist_z(ElConstDistMatrix_z A, ElInt k, double* norm)
ElError ElSymmetricKyFanNorm_s(ElUpperOrLower uplo, ElConstMatrix_s A, ElInt k, float* norm)
ElError ElSymmetricKyFanNorm_d(ElUpperOrLower uplo, ElConstMatrix_d A, ElInt k, double* norm)
ElError ElSymmetricKyFanNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, ElInt k, float* norm)
ElError ElSymmetricKyFanNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, ElInt k, double* norm)
ElError ElSymmetricKyFanNormDist_s(ElUpperOrLower uplo, ElConstDistMatrix_s A, ElInt k, float* norm)
ElError ElSymmetricKyFanNormDist_d(ElUpperOrLower uplo, ElConstDistMatrix_d A, ElInt k, double* norm)
ElError ElSymmetricKyFanNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, ElInt k, float* norm)
ElError ElSymmetricKyFanNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, ElInt k, double* norm)
ElError ElHermitianKyFanNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, ElInt k, float* norm)
ElError ElHermitianKyFanNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, ElInt k, double* norm)
ElError ElHermitianKyFanNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, ElInt k, float* norm)
ElError ElHermitianKyFanNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, ElInt k, double* norm)

Infinity norm

The following routines compute the maximum \(\ell_1\) norm of the rows of A. In the symmetric and Hermitian cases, this is equivalent to the \(\|\cdot \|_1\) norm.

C++ API

Base<F> InfinityNorm(const Matrix<F> &A)
Base<F> InfinityNorm(const AbstractDistMatrix<F> &A)
Base<F> SymmetricInfinityNorm(UpperOrLower uplo, const Matrix<F> &A)
Base<F> SymmetricInfinityNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A)
Base<F> HermitianInfinityNorm(UpperOrLower uplo, const Matrix<F> &A)
Base<F> HermitianInfinityNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A)

C API

ElError ElInfinityNorm_s(ElConstMatrix_s A, float* norm)
ElError ElInfinityNorm_d(ElConstMatrix_d A, double* norm)
ElError ElInfinityNorm_c(ElConstMatrix_c A, float* norm)
ElError ElInfinityNorm_z(ElConstMatrix_z A, double* norm)
ElError ElInfinityNormDist_s(ElConstDistMatrix_s A, float* norm)
ElError ElInfinityNormDist_d(ElConstDistMatrix_d A, double* norm)
ElError ElInfinityNormDist_c(ElConstDistMatrix_c A, float* norm)
ElError ElInfinityNormDist_z(ElConstDistMatrix_z A, double* norm)
ElError ElSymmetricInfinityNorm_s(ElUpperOrLower uplo, ElConstMatrix_s A, float* norm)
ElError ElSymmetricInfinityNorm_d(ElUpperOrLower uplo, ElConstMatrix_d A, double* norm)
ElError ElSymmetricInfinityNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float* norm)
ElError ElSymmetricInfinityNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double* norm)
ElError ElSymmetricInfinityNormDist_s(ElUpperOrLower uplo, ElConstDistMatrix_s A, float* norm)
ElError ElSymmetricInfinityNormDist_d(ElUpperOrLower uplo, ElConstDistMatrix_d A, double* norm)
ElError ElSymmetricInfinityNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float* norm)
ElError ElSymmetricInfinityNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double* norm)
ElError ElHermitianInfinityNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float* norm)
ElError ElHermitianInfinityNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double* norm)
ElError ElHermitianInfinityNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float* norm)
ElError ElHermitianInfinityNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double* norm)

Max norm

The following routines compute the maximum absolute value of the matrix entries.

C++ API

Base<T> MaxNorm(const Matrix<T> &A)
Base<T> MaxNorm(const AbstractDistMatrix<T> &A)
Base<T> MaxNorm(const SparseMatrix<T> &A)
Base<T> MaxNorm(const DistSparseMatrix<T> &A)
Base<T> SymmetricMaxNorm(UpperOrLower uplo, const Matrix<T> &A)
Base<T> SymmetricMaxNorm(UpperOrLower uplo, const AbstractDistMatrix<T> &A)
Base<T> SymmetricMaxNorm(UpperOrLower uplo, const SparseMatrix<T> &A)
Base<T> SymmetricMaxNorm(UpperOrLower uplo, const DistSparseMatrix<T> &A)
Base<T> HermitianMaxNorm(UpperOrLower uplo, const Matrix<T> &A)
Base<T> HermitianMaxNorm(UpperOrLower uplo, const AbstractDistMatrix<T> &A)
Base<T> HermitianMaxNorm(UpperOrLower uplo, const SparseMatrix<T> &A)
Base<T> HermitianMaxNorm(UpperOrLower uplo, const DistSparseMatrix<T> &A)

C API

ElError ElMaxNorm_i(ElConstMatrix_i A, ElInt* norm)
ElError ElMaxNorm_s(ElConstMatrix_s A, float* norm)
ElError ElMaxNorm_d(ElConstMatrix_d A, double* norm)
ElError ElMaxNorm_c(ElConstMatrix_c A, float* norm)
ElError ElMaxNorm_z(ElConstMatrix_z A, double* norm)
ElError ElMaxNormDist_i(ElConstDistMatrix_i A, ElInt* norm)
ElError ElMaxNormDist_s(ElConstDistMatrix_s A, float* norm)
ElError ElMaxNormDist_d(ElConstDistMatrix_d A, double* norm)
ElError ElMaxNormDist_c(ElConstDistMatrix_c A, float* norm)
ElError ElMaxNormDist_z(ElConstDistMatrix_z A, double* norm)
ElError ElSymmetricMaxNorm_i(ElUpperOrLower uplo, ElConstMatrix_i A, ElInt* norm)
ElError ElSymmetricMaxNorm_s(ElUpperOrLower uplo, ElConstMatrix_s A, float* norm)
ElError ElSymmetricMaxNorm_d(ElUpperOrLower uplo, ElConstMatrix_d A, double* norm)
ElError ElSymmetricMaxNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float* norm)
ElError ElSymmetricMaxNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double* norm)
ElError ElSymmetricMaxNormDist_i(ElUpperOrLower uplo, ElConstDistMatrix_i A, ElInt* norm)
ElError ElSymmetricMaxNormDist_s(ElUpperOrLower uplo, ElConstDistMatrix_s A, float* norm)
ElError ElSymmetricMaxNormDist_d(ElUpperOrLower uplo, ElConstDistMatrix_d A, double* norm)
ElError ElSymmetricMaxNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float* norm)
ElError ElSymmetricMaxNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double* norm)
ElError ElHermitianMaxNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float* norm)
ElError ElHermitianMaxNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double* norm)
ElError ElHermitianMaxNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float* norm)
ElError ElHermitianMaxNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double* norm)

Nuclear norm

The following routines compute the sum of the singular values. This is equivalent to both the KyFan norm with \(k=n\) and the Schatten norm with \(p=1\). Note that the nuclear norm is dual to the two-norm, which is the Schatten norm with \(p=\infty\).

C++ API

Base<F> NuclearNorm(const Matrix<F> &A)
Base<F> NuclearNorm(const AbstractDistMatrix<F> &A)
Base<F> SymmetricNuclearNorm(UpperOrLower uplo, const Matrix<F> &A)
Base<F> SymmetricNuclearNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A)
Base<F> HermitianNuclearNorm(UpperOrLower uplo, const Matrix<F> &A)
Base<F> HermitianNuclearNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A)

C API

ElError ElNuclearNorm_s(ElConstMatrix_s A, float* norm)
ElError ElNuclearNorm_d(ElConstMatrix_d A, double* norm)
ElError ElNuclearNorm_c(ElConstMatrix_c A, float* norm)
ElError ElNuclearNorm_z(ElConstMatrix_z A, double* norm)
ElError ElNuclearNormDist_s(ElConstDistMatrix_s A, float* norm)
ElError ElNuclearNormDist_d(ElConstDistMatrix_d A, double* norm)
ElError ElNuclearNormDist_c(ElConstDistMatrix_c A, float* norm)
ElError ElNuclearNormDist_z(ElConstDistMatrix_z A, double* norm)
ElError ElSymmetricNuclearNorm_s(ElUpperOrLower uplo, ElConstMatrix_s A, float* norm)
ElError ElSymmetricNuclearNorm_d(ElUpperOrLower uplo, ElConstMatrix_d A, double* norm)
ElError ElSymmetricNuclearNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float* norm)
ElError ElSymmetricNuclearNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double* norm)
ElError ElSymmetricNuclearNormDist_s(ElUpperOrLower uplo, ElConstDistMatrix_s A, float* norm)
ElError ElSymmetricNuclearNormDist_d(ElUpperOrLower uplo, ElConstDistMatrix_d A, double* norm)
ElError ElSymmetricNuclearNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float* norm)
ElError ElSymmetricNuclearNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double* norm)
ElError ElHermitianNuclearNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float* norm)
ElError ElHermitianNuclearNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double* norm)
ElError ElHermitianNuclearNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float* norm)
ElError ElHermitianNuclearNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double* norm)

One norm

The following routines compute the maximum \(\ell_1\) norm of the columns of A. In the symmetric and Hermitian cases, this is equivalent to the \(\| \cdot \|_\infty\) norm.

C++ API

Base<F> OneNorm(const Matrix<F> &A)
Base<F> OneNorm(const AbstractDistMatrix<F> &A)
Base<F> SymmetricOneNorm(UpperOrLower uplo, const Matrix<F> &A)
Base<F> SymmetricOneNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A)
Base<F> HermitianOneNorm(UpperOrLower uplo, const Matrix<F> &A)
Base<F> HermitianOneNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A)

C API

ElError ElOneNorm_s(ElConstMatrix_s A, float* norm)
ElError ElOneNorm_d(ElConstMatrix_d A, double* norm)
ElError ElOneNorm_c(ElConstMatrix_c A, float* norm)
ElError ElOneNorm_z(ElConstMatrix_z A, double* norm)
ElError ElOneNormDist_s(ElConstDistMatrix_s A, float* norm)
ElError ElOneNormDist_d(ElConstDistMatrix_d A, double* norm)
ElError ElOneNormDist_c(ElConstDistMatrix_c A, float* norm)
ElError ElOneNormDist_z(ElConstDistMatrix_z A, double* norm)
ElError ElSymmetricOneNorm_s(ElUpperOrLower uplo, ElConstMatrix_s A, float* norm)
ElError ElSymmetricOneNorm_d(ElUpperOrLower uplo, ElConstMatrix_d A, double* norm)
ElError ElSymmetricOneNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float* norm)
ElError ElSymmetricOneNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double* norm)
ElError ElSymmetricOneNormDist_s(ElUpperOrLower uplo, ElConstDistMatrix_s A, float* norm)
ElError ElSymmetricOneNormDist_d(ElUpperOrLower uplo, ElConstDistMatrix_d A, double* norm)
ElError ElSymmetricOneNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float* norm)
ElError ElSymmetricOneNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double* norm)
ElError ElHermitianOneNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float* norm)
ElError ElHermitianOneNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double* norm)
ElError ElHermitianOneNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float* norm)
ElError ElHermitianOneNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double* norm)

Schatten norm

The following routines compute the \(\ell_p\) norm of the singular values.

C++ API

Base<F> SchattenNorm(const Matrix<F> &A, Base<F> p)
Base<F> SchattenNorm(const AbstractDistMatrix<F> &A, Base<F> p)
Base<F> SymmetricSchattenNorm(UpperOrLower uplo, const Matrix<F> &A, Base<F> p)
Base<F> SymmetricSchattenNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A, Base<F> p)
Base<F> HermitianSchattenNorm(UpperOrLower uplo, const Matrix<F> &A, Base<F> p)
Base<F> HermitianSchattenNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A, Base<F> p)

C API

ElError ElSchattenNorm_s(ElConstMatrix_s A, float p, float* norm)
ElError ElSchattenNorm_d(ElConstMatrix_d A, double p, double* norm)
ElError ElSchattenNorm_c(ElConstMatrix_c A, float p, float* norm)
ElError ElSchattenNorm_z(ElConstMatrix_z A, double p, double* norm)
ElError ElSchattenNormDist_s(ElConstDistMatrix_s A, float p, float* norm)
ElError ElSchattenNormDist_d(ElConstDistMatrix_d A, double p, double* norm)
ElError ElSchattenNormDist_c(ElConstDistMatrix_c A, float p, float* norm)
ElError ElSchattenNormDist_z(ElConstDistMatrix_z A, double p, double* norm)

Two norm

The following routines compute the maximum singular value. This is equivalent to the KyFan norm with k equal to one and the Schatten norm with \(p=\infty\).

C++ API

Base<F> TwoNorm(const Matrix<F> &A)
Base<F> TwoNorm(const AbstractDistMatrix<F> &A)
Base<F> SymmetricTwoNorm(UpperOrLower uplo, const Matrix<F> &A)
Base<F> SymmetricTwoNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A)
Base<F> HermitianTwoNorm(UpperOrLower uplo, const Matrix<F> &A)
Base<F> HermitianTwoNorm(UpperOrLower uplo, const AbstractDistMatrix<F> &A)

C API

ElError ElTwoNorm_s(ElConstMatrix_s A, float* norm)
ElError ElTwoNorm_d(ElConstMatrix_d A, double* norm)
ElError ElTwoNorm_c(ElConstMatrix_c A, float* norm)
ElError ElTwoNorm_z(ElConstMatrix_z A, double* norm)
ElError ElTwoNormDist_s(ElConstDistMatrix_s A, float* norm)
ElError ElTwoNormDist_d(ElConstDistMatrix_d A, double* norm)
ElError ElTwoNormDist_c(ElConstDistMatrix_c A, float* norm)
ElError ElTwoNormDist_z(ElConstDistMatrix_z A, double* norm)
ElError ElSymmetricTwoNorm_s(ElUpperOrLower uplo, ElConstMatrix_s A, float* norm)
ElError ElSymmetricTwoNorm_d(ElUpperOrLower uplo, ElConstMatrix_d A, double* norm)
ElError ElSymmetricTwoNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float* norm)
ElError ElSymmetricTwoNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double* norm)
ElError ElSymmetricTwoNormDist_s(ElUpperOrLower uplo, ElConstDistMatrix_s A, float* norm)
ElError ElSymmetricTwoNormDist_d(ElUpperOrLower uplo, ElConstDistMatrix_d A, double* norm)
ElError ElSymmetricTwoNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float* norm)
ElError ElSymmetricTwoNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double* norm)
ElError ElHermitianTwoNorm_c(ElUpperOrLower uplo, ElConstMatrix_c A, float* norm)
ElError ElHermitianTwoNorm_z(ElUpperOrLower uplo, ElConstMatrix_z A, double* norm)
ElError ElHermitianTwoNormDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float* norm)
ElError ElHermitianTwoNormDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double* norm)

Zero “norm”

The following routines return the number of nonzero entries in the matrix. This operation is often casually referred to as the zero “norm”.

C++ API

Int ZeroNorm(const Matrix<T> &A)
Int ZeroNorm(const AbstractDistMatrix<T> &A)

C API

ElError ElZeroNorm_i(ElConstMatrix_i, ElInt* numNonzero)
ElError ElZeroNorm_s(ElConstMatrix_s, ElInt* numNonzero)
ElError ElZeroNorm_d(ElConstMatrix_d, ElInt* numNonzero)
ElError ElZeroNorm_c(ElConstMatrix_c, ElInt* numNonzero)
ElError ElZeroNorm_z(ElConstMatrix_z, ElInt* numNonzero)
ElError ElZeroNormDist_i(ElConstDistMatrix_i, ElInt* numNonzero)
ElError ElZeroNormDist_s(ElConstDistMatrix_s, ElInt* numNonzero)
ElError ElZeroNormDist_d(ElConstDistMatrix_d, ElInt* numNonzero)
ElError ElZeroNormDist_c(ElConstDistMatrix_c, ElInt* numNonzero)
ElError ElZeroNormDist_z(ElConstDistMatrix_z, ElInt* numNonzero)

Two-norm estimates

The following routines return an estimate for the two-norm which should be accurate within a factor of \(n\) times the specified tolerance.

C++ API

Base<F> TwoNormEstimate(const Matrix<F> &A, Base<F> tol = 1e-6, Int maxIts = 1000)
Base<F> TwoNormEstimate(const AbstractDistMatrix<F> &A, Base<F> tol = 1e-6, Int maxIts = 1000)
Base<F> SymmetricTwoNormEstimate(UpperOrLower uplo, const Matrix<F> &A, Base<F> tol = 1e-6, Int maxIts = 1000)
Base<F> SymmetricTwoNormEstimate(UpperOrLower uplo, const AbstractDistMatrix<F> &A, Base<F> tol = 1e-6, Int maxIts = 1000)
Base<F> HermitianTwoNormEstimate(UpperOrLower uplo, const Matrix<F> &A, Base<F> tol = 1e-6, Int maxIts = 1000)
Base<F> HermitianTwoNormEstimate(UpperOrLower uplo, const AbstractDistMatrix<F> &A, Base<F> tol = 1e-6, Int maxIts = 1000)

C API

ElError ElTwoNormEstimate_s(ElConstMatrix_s A, float tol, ElInt maxIts)
ElError ElTwoNormEstimate_d(ElConstMatrix_d A, double tol, ElInt maxIts)
ElError ElTwoNormEstimate_c(ElConstMatrix_c A, float tol, ElInt maxIts)
ElError ElTwoNormEstimate_z(ElConstMatrix_z A, double tol, ElInt maxIts)
ElError ElTwoNormEstimateDist_s(ElConstDistMatrix_s A, float tol, ElInt maxIts)
ElError ElTwoNormEstimateDist_d(ElConstDistMatrix_d A, double tol, ElInt maxIts)
ElError ElTwoNormEstimateDist_c(ElConstDistMatrix_c A, float tol, ElInt maxIts)
ElError ElTwoNormEstimateDist_z(ElConstDistMatrix_z A, double tol, ElInt maxIts)
ElError ElSymmetricTwoNormEstimate_s(ElUpperOrLower uplo, ElConstMatrix_s A, float tol, ElInt maxIts)
ElError ElSymmetricTwoNormEstimate_d(ElUpperOrLower uplo, ElConstMatrix_d A, double tol, ElInt maxIts)
ElError ElSymmetricTwoNormEstimate_c(ElUpperOrLower uplo, ElConstMatrix_c A, float tol, ElInt maxIts)
ElError ElSymmetricTwoNormEstimate_z(ElUpperOrLower uplo, ElConstMatrix_z A, double tol, ElInt maxIts)
ElError ElSymmetricTwoNormEstimateDist_s(ElUpperOrLower uplo, ElConstDistMatrix_s A, float tol, ElInt maxIts)
ElError ElSymmetricTwoNormEstimateDist_d(ElUpperOrLower uplo, ElConstDistMatrix_d A, double tol, ElInt maxIts)
ElError ElSymmetricTwoNormEstimateDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float tol, ElInt maxIts)
ElError ElSymmetricTwoNormEstimateDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double tol, ElInt maxIts)
ElError ElHermitianTwoNormEstimate_c(ElUpperOrLower uplo, ElConstMatrix_c A, float tol, ElInt maxIts)
ElError ElHermitianTwoNormEstimate_z(ElUpperOrLower uplo, ElConstMatrix_z A, double tol, ElInt maxIts)
ElError ElHermitianTwoNormEstimateDist_c(ElUpperOrLower uplo, ElConstDistMatrix_c A, float tol, ElInt maxIts)
ElError ElHermitianTwoNormEstimateDist_z(ElUpperOrLower uplo, ElConstDistMatrix_z A, double tol, ElInt maxIts)