[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] SVD Help.
- From: Tim Hutt <tdhutt@xxxxxxxxx>
- Date: Fri, 9 Oct 2009 12:44:11 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=Wo99/5v2xLjSfItREPWQn3FvZgZrfF0F0z4H7ANfp/A=; b=l0xK9HoHij6KCaVSCsrW0ZpKksHzTOsCC96mg79gOQ66HDMLLYulg3u2frdAAt8RcP VgcaKbuevUo0ypynceXykjHJBGL4X6AweLC7woMIvGfTzxx39BylmTK0my8ZwictfQMw niGhT9KEO55T8dbRNIY5hX7pNaS9ezN3HBHkE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=O78hQWPj96A2i7JZc1wtfezxKBA7ushcDoIYydGvb6vjPmIy4HiGNf4xixtR9x5rM+ ZumF/zPEDnxbJkxuhj4rw0Wtg2Jfsga9g8JG88nejjbGyo9r1Z4Nw5iQ4g4FdphyauX8 E2zBnD5tw1u1FXORIwyBL06uL3CqdcQJjG1R4=
Hi, I'm having some problems with SVDs:
MatrixXcd K = ...;
SVD<MatrixXcd> svdres = K.svd();
MatrixXcd U = svdres.matrixU();
VectorXd s = svdres.singularValues();
double d = s(1);
Gives the error:
Error 5 error C2678: binary '<' : no operator found which takes a
left-hand operand of type 'std::complex<double>' (or there is no
acceptable conversion) c:\documents and settings\administrator\my
documents\visual studio
2008\projects\images\images\eigen\src\SVD\SVD.h 136 Images
The offending code:
// Compute the transformation for the k-th column and
// place the k-th diagonal in m_sigma[k].
m_sigma[k] = matA.col(k).end(m-k).norm();
if (m_sigma[k] != 0.0) // FIXME
{
if (matA(k,k) < 0.0) <-------- Error here.
m_sigma[k] = -m_sigma[k];
matA.col(k).end(m-k) /= m_sigma[k];
matA(k,k) += 1.0;
}
m_sigma[k] = -m_sigma[k];
Does Eigen2 not support SVDs of complex matrices?