[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] gsl_linalg_complex_householder_hv() does not handle case N=1 (
[Bug-gsl] gsl_linalg_complex_householder_hv() does not handle case N=1 (patch attached)
Mon, 27 Nov 2017 14:59:48 +0000
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
The function gsl_linalg_complex_householder_hv(tau, v, w) [apply the
Householder transform defined by (tau, v) to the vector w] does not
check for the mildly pathological case where length of the involved
vectors is 1. In this case, a subvector()-call in the code cannot be
executed as it exceeds the index limits and the code breaks.
I encountered this problem when implementing the QR decomposition for
In the real-valued case, a vector of length 1 results in tau=0 when
calculating the HH transform using gsl_linalg_householder_transform()
and the corresponding function gsl_linalg_househoulder_hv() explicitly
checks for tau=0 and exits in this case.
In the complex-valued case, the HH transform of a vector of length 1
does *not* necessarily imply tau=0 which is why the case N=1 has to be
handled separately in gsl_linalg_complex_householder_hv().
I have attached a patch for linalg/householdercomplex.c which handles
the N=1 case.
To be patched against GSL 2.4; I have cloned the github repository a few
days ago. As that's my first patch, please let me know if I need to
provide anything else or if a different format would be better.
Description: Text Data
|[Prev in Thread]
||[Next in Thread]|
- [Bug-gsl] gsl_linalg_complex_householder_hv() does not handle case N=1 (patch attached),
Christian Krueger <=