-
Notifications
You must be signed in to change notification settings - Fork 11
Add Dsteqr and test #107
Conversation
native/dsteqr.go
Outdated
if anorm == 0 { | ||
goto Ten | ||
} | ||
// TODO(btracey): Replace this with a constant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "this"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it was a note to myself to have the same up/down constants. I replaced this.
PTAL |
native/dsteqr.go
Outdated
if anorm == 0 { | ||
goto Ten | ||
} | ||
if anorm > ssfmax { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a switch too, and clean up the line ordering to be consistent between the two cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
LGTM but wait for @vladimir-ch. |
return true | ||
} | ||
if n == 1 { | ||
if icompz == 2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just being curious: why isn't z[0] set to 1 if icompz == 1? The documentation says that it will also contain orthonormal eigenvectors. Sorry if the reason is obvious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure the code is correct. The reason is that if compz == 'V' then z already contains a valid diagonalization (according to any of the metrics specified). If compz == 'I', then z can contain anything and z must be set to I. Since size(z) = 1, it's just the first element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the doc comment says that z contains something only if compz == lapack.EigBoth (compz == 'I').
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation is incorrect. Fixed.
LGTM |
No description provided.