More Index realted warnings.

This commit is contained in:
Hauke Heibel 2010-06-20 15:52:34 +02:00
parent 7548708848
commit e402d34407
7 changed files with 11 additions and 11 deletions

View File

@ -192,7 +192,7 @@ class PermutationMatrix : public EigenBase<PermutationMatrix<SizeAtCompileTime,
/** Sets *this to be the identity permutation matrix of given size. /** Sets *this to be the identity permutation matrix of given size.
*/ */
void setIdentity(int size) void setIdentity(Index size)
{ {
resize(size); resize(size);
setIdentity(); setIdentity();

View File

@ -43,8 +43,8 @@ EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Quaterniond)
template<typename MatrixType> template<typename MatrixType>
void check_stdvector_matrix(const MatrixType& m) void check_stdvector_matrix(const MatrixType& m)
{ {
int rows = m.rows(); typename MatrixType::Index rows = m.rows();
int cols = m.cols(); typename MatrixType::Index cols = m.cols();
MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols); MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);
std::vector<MatrixType> v(10, MatrixType(rows,cols)), w(20, y); std::vector<MatrixType> v(10, MatrixType(rows,cols)), w(20, y);
v[5] = x; v[5] = x;

View File

@ -31,8 +31,8 @@ template<typename MatrixType> void svd(const MatrixType& m)
/* this test covers the following files: /* this test covers the following files:
SVD.h SVD.h
*/ */
int rows = m.rows(); typename MatrixType::Index rows = m.rows();
int cols = m.cols(); typename MatrixType::Index cols = m.cols();
typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::Scalar Scalar;
typedef typename NumTraits<Scalar>::Real RealScalar; typedef typename NumTraits<Scalar>::Real RealScalar;

View File

@ -43,8 +43,8 @@ template<typename MatrixType> void swap(const MatrixType& m)
typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::Scalar Scalar;
ei_assert((!ei_is_same_type<MatrixType,OtherMatrixType>::ret)); ei_assert((!ei_is_same_type<MatrixType,OtherMatrixType>::ret));
int rows = m.rows(); typename MatrixType::Index rows = m.rows();
int cols = m.cols(); typename MatrixType::Index cols = m.cols();
// construct 3 matrix guaranteed to be distinct // construct 3 matrix guaranteed to be distinct
MatrixType m1 = MatrixType::Random(rows,cols); MatrixType m1 = MatrixType::Random(rows,cols);

View File

@ -34,8 +34,8 @@ template<typename MatrixType> void triangular_square(const MatrixType& m)
RealScalar largerEps = 10*test_precision<RealScalar>(); RealScalar largerEps = 10*test_precision<RealScalar>();
int rows = m.rows(); typename MatrixType::Index rows = m.rows();
int cols = m.cols(); typename MatrixType::Index cols = m.cols();
MatrixType m1 = MatrixType::Random(rows, cols), MatrixType m1 = MatrixType::Random(rows, cols),
m2 = MatrixType::Random(rows, cols), m2 = MatrixType::Random(rows, cols),

View File

@ -79,7 +79,7 @@ public:
/* Local variables */ /* Local variables */
Scalar h; Scalar h;
int nfev=0; int nfev=0;
const int n = _x.size(); const typename InputType::Index n = _x.size();
const Scalar eps = ei_sqrt((std::max(epsfcn,NumTraits<Scalar>::epsilon() ))); const Scalar eps = ei_sqrt((std::max(epsfcn,NumTraits<Scalar>::epsilon() )));
ValueType val1, val2; ValueType val1, val2;
InputType x = _x; InputType x = _x;

View File

@ -447,7 +447,7 @@ struct lmstr_functor : Functor<double>
} }
return 0; return 0;
} }
int df(const VectorXd &x, VectorXd &jac_row, int rownb) int df(const VectorXd &x, VectorXd &jac_row, VectorXd::Index rownb)
{ {
assert(x.size()==3); assert(x.size()==3);
assert(jac_row.size()==x.size()); assert(jac_row.size()==x.size());