Frobenius norms

Header file

Implementation

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> FrobeniusNorm(const DistMultiVec<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 ElFrobeniusNormSparse_s(ElConstSparseMatrix_s A, float* norm)
ElError ElFrobeniusNormSparse_d(ElConstSparseMatrix_d A, double* norm)
ElError ElFrobeniusNormSparse_c(ElConstSparseMatrix_c A, float* norm)
ElError ElFrobeniusNormSparse_z(ElConstSparseMatrix_z A, double* norm)
ElError ElFrobeniusNormDistSparse_s(ElConstDistSparseMatrix_s A, float* norm)
ElError ElFrobeniusNormDistSparse_d(ElConstDistSparseMatrix_d A, double* norm)
ElError ElFrobeniusNormDistSparse_c(ElConstDistSparseMatrix_c A, float* norm)
ElError ElFrobeniusNormDistSparse_z(ElConstDistSparseMatrix_z A, double* norm)
ElError ElFrobeniusNormDistMultiVec_s(ElConstDistMultiVec_s A, float* norm)
ElError ElFrobeniusNormDistMultiVec_d(ElConstDistMultiVec_d A, double* norm)
ElError ElFrobeniusNormDistMultiVec_c(ElConstDistMultiVec_c A, float* norm)
ElError ElFrobeniusNormDistMultiVec_z(ElConstDistMultiVec_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)

Python API

FrobeniusNorm(A)
HermitianFrobeniusNorm(A, uplo=LOWER)
SymmetricFrobeniusNorm(A, uplo=LOWER)