-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
There seems to be an issue in AbstractLAPACK.java
in dgeev
.
My test input works with netlib.fommil
and looks like this:
int n = 2;
double[] a = {1.0, 0.75, 0.5, 1.0};
double[] wr = new double[2];
double[] wi = new double[2];
int lwork = 68; // optimal size from previous query
double[] work = new double[lwork];
intW info = new intW(2);
LAPACK.getInstance().dgeev("N", "N", n, a, n, wr, wi, new double[1], 1, new double[1], 1, work, lwork, info);
To my understanding, that should give the following eigenvalues in wr
:
My suspicion is that lines 338-341
if (lsame("N", jobvl))
checkIndex(offsetvl + n * ldvl - 1, vl.length);
if (lsame("N", jobvr))
checkIndex(offsetvr + n * ldvr - 1, vr.length);
should read
if (lsame("V", jobvl))
checkIndex(offsetvl + n * ldvl - 1, vl.length);
if (lsame("V", jobvr))
checkIndex(offsetvr + n * ldvr - 1, vr.length);
The documentation of LAPACK states for vl
that (similar for vr
)
If JOBVL = 'N', VL is not referenced.
so I would at least not intuit that its length matters (or I may very well miss something).
PS: Thanks for fixing the split packages!
Metadata
Metadata
Assignees
Labels
No labels