/// <summary>Returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of general band matrix. /// </summary> /// <param name="matrixNormType">The type of the matrix norm.</param> /// <param name="n">The order of the quadratic general band matrix.</param> /// <param name="kl">The number of sub-diagonals of the specific general band matrix.</param> /// <param name="ku">The number of super-diagonals of the specific general band matrix.</param> /// <param name="a">The general band matrix stored in general band matrix storage, i.e. column-by-column, where each column contains exactly <paramref name="kl" /> + <paramref name="ku" /> + 1 elements.</param> /// <param name="work">A workspace array which is referenced in the case of infinity norm only. In this case the length must be at least <paramref name="n" />.</param> /// <returns>The value of the specific matrix norm.</returns> public double zlangb(MatrixNormType matrixNormType, int n, int kl, int ku, Complex[] a, Complex[] work) { var norm = LapackNativeWrapper.GetMatrixNormType(matrixNormType); int ldab = kl + ku + 1; return(_zlangb(ref norm, ref n, ref kl, ref ku, a, ref ldab, work)); }
/// <summary>Returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of general rectangular matrix. /// </summary> /// <param name="matrixNormType">The type of the matrix norm.</param> /// <param name="m">Th enumber of rows.</param> /// <param name="n">The number of columns.</param> /// <param name="a">The <paramref name="m"/>-by-<paramref name="n"/> dense matrix provided column-by-column.</param> /// <param name="work">A workspace array which is referenced in the case of infinity norm only. In this case the length must be at least <paramref name="m"/>.</param> /// <returns>The value of the specific matrix norm.</returns> public double dlange(MatrixNormType matrixNormType, int m, int n, double[] a, double[] work) { var norm = LapackNativeWrapper.GetMatrixNormType(matrixNormType); int lda = Math.Max(1, m); return(_dlange(ref norm, ref m, ref n, a, ref lda, work)); }
/// <summary>Returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of symmetric matrix supplied in packed form. /// </summary> /// <param name="matrixNormType">The type of the matrix norm.</param> /// <param name="n">The order of the matrix.</param> /// <param name="ap">The specified symmetric matrix in packed form, i.e. either upper or lower triangle as specified in <paramref name="triangularMatrixType"/> with at least <paramref name="n"/> * (<paramref name="n"/> + 1) / 2 elements.</param> /// <param name="work">A workspace array which is referenced in the case of 1- or infinity-norm only. In this case the length must be at least <paramref name="n"/>.</param> /// <param name="triangularMatrixType">A value indicating whether the upper or lower triangular part of the symmetric input matrix is stored.</param> /// <returns>The value of the specific matrix norm.</returns> public double zlansp(MatrixNormType matrixNormType, int n, Complex[] ap, Complex[] work, BLAS.TriangularMatrixType triangularMatrixType = BLAS.TriangularMatrixType.LowerTriangularMatrix) { var norm = LapackNativeWrapper.GetMatrixNormType(matrixNormType); var uplo = LapackNativeWrapper.GetUplo(triangularMatrixType); return(_zlansp(ref norm, ref uplo, ref n, ap, work)); }