From b091b0b4e25267df4e0e5a4e9effe8b8ae992bee Mon Sep 17 00:00:00 2001 From: Vladimir Chalupecky Date: Fri, 4 Feb 2022 08:52:23 +0100 Subject: [PATCH] lapack/gonum: clarify ok return from Dpstrf and Dpstf2 --- lapack/gonum/dpstf2.go | 7 ++++--- lapack/gonum/dpstrf.go | 7 ++++--- lapack/lapack64/lapack64.go | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lapack/gonum/dpstf2.go b/lapack/gonum/dpstf2.go index a1d10f94..134fa674 100644 --- a/lapack/gonum/dpstf2.go +++ b/lapack/gonum/dpstf2.go @@ -27,9 +27,10 @@ import ( // On return, A contains the factor U or L from the Cholesky factorization and // piv contains P stored such that P[piv[k],k] = 1. // -// Dpstf2 returns the computed rank of A and whether the algorithm completed -// successfully. If ok is false, the matrix A is either rank deficient or is not -// positive semidefinite. +// Dpstf2 returns the computed rank of A and whether the factorization can be +// used to solve a system. Dpstf2 does not attempt to check that A is positive +// semi-definite, so if ok is false, the matrix A is either rank deficient or is +// not positive semidefinite. // // The length of piv must be n and the length of work must be at least 2*n, // otherwise Dpstf2 will panic. diff --git a/lapack/gonum/dpstrf.go b/lapack/gonum/dpstrf.go index 5c591a2a..21ea49a3 100644 --- a/lapack/gonum/dpstrf.go +++ b/lapack/gonum/dpstrf.go @@ -27,9 +27,10 @@ import ( // On return, A contains the factor U or L from the Cholesky factorization and // piv contains P stored such that P[piv[k],k] = 1. // -// Dpstrf returns the computed rank of A and whether the algorithm completed -// successfully. If ok is false, the matrix A is either rank deficient or is not -// positive semidefinite. +// Dpstrf returns the computed rank of A and whether the factorization can be +// used to solve a system. Dpstrf does not attempt to check that A is positive +// semi-definite, so if ok is false, the matrix A is either rank deficient or is +// not positive semidefinite. // // The length of piv must be n and the length of work must be at least 2*n, // otherwise Dpstrf will panic. diff --git a/lapack/lapack64/lapack64.go b/lapack/lapack64/lapack64.go index 9e5f1546..66bbd9d0 100644 --- a/lapack/lapack64/lapack64.go +++ b/lapack/lapack64/lapack64.go @@ -145,9 +145,10 @@ func Pbtrs(t blas64.TriangularBand, b blas64.General) { // and the underlying data between a and t is shared. P is stored on return in // vector piv such that P[piv[k],k] = 1. // -// Pstrf also returns the computed rank of A and whether the algorithm completed -// successfully. If ok is false, the matrix A is either rank deficient or is not -// positive semidefinite. +// Pstrf returns the computed rank of A and whether the factorization can be +// used to solve a system. Pstrf does not attempt to check that A is positive +// semi-definite, so if ok is false, the matrix A is either rank deficient or is +// not positive semidefinite. // // The length of piv must be n and the length of work must be at least 2*n, // otherwise Pstrf will panic.