Several compilation fixes for MSVC and NVCC, basically:

- added explicit enum to int conversion where needed
- if a function is not defined as declared and the return type is "tricky"
  then the type must be typedefined somewhere. A "tricky return type" can be:
  * a template class with a default parameter which depends on another template parameter
  * a nested template class, or type of a nested template class
This commit is contained in:
Gael Guennebaud
2008-07-29 16:33:07 +00:00
parent e0215ee510
commit 842c4f8bfa
17 changed files with 219 additions and 207 deletions

View File

@@ -168,7 +168,7 @@ MatrixType QR<MatrixType>::matrixQ(void) const
* \sa class QR
*/
template<typename Derived>
const QR<typename ei_eval<Derived>::type>
const QR<typename MatrixBase<Derived>::EvalType>
MatrixBase<Derived>::qr() const
{
return QR<typename ei_eval<Derived>::type>(derived());

View File

@@ -41,6 +41,7 @@ template<typename _MatrixType> class SelfAdjointEigenSolver
{
public:
enum {Size = _MatrixType::RowsAtCompileTime };
typedef _MatrixType MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef typename NumTraits<Scalar>::Real RealScalar;
@@ -49,6 +50,18 @@ template<typename _MatrixType> class SelfAdjointEigenSolver
typedef Matrix<RealScalar, Dynamic, 1> RealVectorTypeX;
typedef Tridiagonalization<MatrixType> TridiagonalizationType;
SelfAdjointEigenSolver()
: m_eivec(Size, Size),
m_eivalues(Size)
{
ei_assert(Size!=Dynamic);
}
SelfAdjointEigenSolver(int size)
: m_eivec(size, size),
m_eivalues(size)
{}
/** Constructors computing the eigenvalues of the selfadjoint matrix \a matrix,
* as well as the eigenvectors if \a computeEigenvectors is true.
*