[eigen] SVD Help.

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


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?



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/