Found a way to have eval() be a member function of class EiObject, instead of a global function.

CCMAIL:bensch128@yahoo.com
This commit is contained in:
Benoit Jacob
2007-09-28 06:10:34 +00:00
parent 28c44a95c2
commit 835e0c9f67
8 changed files with 66 additions and 16 deletions

View File

@@ -39,7 +39,7 @@ template<typename MatrixType> void matrixManip(const MatrixType& m)
a.row(i) += b.row(i);
a.col(j) *= 2;
a.minor(i, j) = b.block(1, rows-1, 1, cols-1);
a.minor(i, j) -= eval(a.block(1, rows-1, 1, cols-1));
a.minor(i, j) -= a.block(1, rows-1, 1, cols-1).eval();
}
void EigenTest::testMatrixManip()

View File

@@ -44,7 +44,7 @@ template<typename MatrixType1,
a = b;
a = b + c;
a = s * (b - c);
a = eval(a + b);
a = (a + b).eval();
a += b;
a -= b + b;
a *= s;

View File

@@ -42,13 +42,13 @@ template<typename VectorType> void vectorOps(const VectorType& v)
a = b;
a = b + c;
a = s * (b - c);
a = eval(s * (b - c));
a = (s * (b - c)).eval();
a += b;
a -= b + b;
a *= s;
b /= s;
a += eval(a + a);
a += (a + a).eval();
}
void EigenTest::testVectorOps()