Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Commit

Permalink
Karl's geev fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Aug 21, 2008
1 parent e72b237 commit b90458e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions boost/numeric/bindings/lapack/geev.hpp
Expand Up @@ -171,7 +171,7 @@ namespace boost { namespace numeric { namespace bindings {
work.storage(), &lwork);

for (int i = 0; i < n; i++)
w[i] = std::complex<value_type>(wr[i], wi[i]);
traits::vector_storage(w)[i] = std::complex<value_type>(wr[i], wi[i]);
return result;
}

Expand Down Expand Up @@ -226,14 +226,16 @@ namespace boost { namespace numeric { namespace bindings {

for (int i = 0; i < n; i++)
{
w[i] = std::complex<value_type>(wr[i], wi[i]);
traits::vector_storage(w)[i] = std::complex<value_type>(wr[i], wi[i]);

if (wi[i] != 0)
{
assert(i+1 < n);
assert(wr[i+1] == wr[i]);
assert(wi[i+1] == -wi[i]);

w[i+1] = std::complex<value_type>(wr[i+1], wi[i+1]);
traits::vector_storage(w)[i+1] = std::complex<value_type>(wr[i+1], wi[i+1]);

for (int j = 0; j < n; j++)
{
if (vl)
Expand Down

0 comments on commit b90458e

Please sign in to comment.