Entrywise norms

Header file

Implementation

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> EntrywiseNorm(const DistMultiVec<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 ElEntrywiseNormSparse_s(ElConstSparseMatrix_s A, float p, float* norm)
ElError ElEntrywiseNormSparse_d(ElConstSparseMatrix_d A, double p, double* norm)
ElError ElEntrywiseNormSparse_c(ElConstSparseMatrix_c A, float p, float* norm)
ElError ElEntrywiseNormSparse_z(ElConstSparseMatrix_z A, double p, double* norm)
ElError ElEntrywiseNormDistSparse_s(ElConstDistSparseMatrix_s A, float p, float* norm)
ElError ElEntrywiseNormDistSparse_d(ElConstDistSparseMatrix_d A, double p, double* norm)
ElError ElEntrywiseNormDistSparse_c(ElConstDistSparseMatrix_c A, float p, float* norm)
ElError ElEntrywiseNormDistSparse_z(ElConstDistSparseMatrix_z A, double p, double* norm)
ElError ElEntrywiseNormDistMultiVec_s(ElConstDistMultiVec_s A, float p, float* norm)
ElError ElEntrywiseNormDistMultiVec_d(ElConstDistMultiVec_d A, double p, double* norm)
ElError ElEntrywiseNormDistMultiVec_c(ElConstDistMultiVec_c A, float p, float* norm)
ElError ElEntrywiseNormDistMultiVec_z(ElConstDistMultiVec_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 ElSymmetricEntrywiseNormSparse_s(ElUpperOrLower uplo, ElConstSparseMatrix_s A, float p, float* norm)
ElError ElSymmetricEntrywiseNormSparse_d(ElUpperOrLower uplo, ElConstSparseMatrix_d A, double p, double* norm)
ElError ElSymmetricEntrywiseNormSparse_c(ElUpperOrLower uplo, ElConstSparseMatrix_c A, float p, float* norm)
ElError ElSymmetricEntrywiseNormSparse_z(ElUpperOrLower uplo, ElConstSparseMatrix_z A, double p, double* norm)
ElError ElSymmetricEntrywiseNormDistSparse_s(ElUpperOrLower uplo, ElConstDistSparseMatrix_s A, float p, float* norm)
ElError ElSymmetricEntrywiseNormDistSparse_d(ElUpperOrLower uplo, ElConstDistSparseMatrix_d A, double p, double* norm)
ElError ElSymmetricEntrywiseNormDistSparse_c(ElUpperOrLower uplo, ElConstDistSparseMatrix_c A, float p, float* norm)
ElError ElSymmetricEntrywiseNormDistSparse_z(ElUpperOrLower uplo, ElConstDistSparseMatrix_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)
ElError ElHermitianEntrywiseNormSparse_c(ElUpperOrLower uplo, ElConstSparseMatrix_c A, float p, float* norm)
ElError ElHermitianEntrywiseNormSparse_z(ElUpperOrLower uplo, ElConstSparseMatrix_z A, double p, double* norm)
ElError ElHermitianEntrywiseNormDistSparse_c(ElUpperOrLower uplo, ElConstDistSparseMatrix_c A, float p, float* norm)
ElError ElHermitianEntrywiseNormDistSparse_z(ElUpperOrLower uplo, ElConstDistSparseMatrix_z A, double p, double* norm)

Python API

EntrywiseNorm(A, p=1)
HermitianEntrywiseNorm(A, p=1, uplo=LOWER)
SymmetricEntrywiseNorm(A, p=1, uplo=LOWER)