diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/example.cpp | 10 | ||||
-rw-r--r-- | doc/tutorial.cpp | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/doc/example.cpp b/doc/example.cpp index 75d47f988..ca10d077a 100644 --- a/doc/example.cpp +++ b/doc/example.cpp @@ -1,23 +1,25 @@ #include "../src/Core.h" +USING_EIGEN_DATA_TYPES + using namespace std; template<typename Scalar, typename Derived> -void foo(const EiObject<Scalar, Derived>& m) +void foo(const Eigen::Object<Scalar, Derived>& m) { cout << "Here's m:" << endl << m << endl; } template<typename Scalar, typename Derived> -EiScalarProduct<Derived> -twice(const EiObject<Scalar, Derived>& m) +Eigen::ScalarProduct<Derived> +twice(const Eigen::Object<Scalar, Derived>& m) { return 2 * m; } int main(int, char**) { - EiMatrix2d m; + Matrix2d m; m(0,0)= 1; m(1,0)= 2; m(0,1)= 3; diff --git a/doc/tutorial.cpp b/doc/tutorial.cpp index ab145bf3f..4400bd2d1 100644 --- a/doc/tutorial.cpp +++ b/doc/tutorial.cpp @@ -1,10 +1,12 @@ #include "../src/Core.h" +USING_EIGEN_DATA_TYPES + using namespace std; int main(int, char **) { - EiMatrix<double,2,2> m; // 2x2 fixed-size matrix with uninitialized entries + Matrix<double,2,2> m; // 2x2 fixed-size matrix with uninitialized entries m(0,0) = 1; m(0,1) = 2; m(1,0) = 3; @@ -12,7 +14,7 @@ int main(int, char **) cout << "Here is a 2x2 matrix m:" << endl << m << endl; cout << "Let us now build a 4x4 matrix m2 by assembling together four 2x2 blocks." << endl; - EiMatrixXd m2(4,4); // dynamic matrix with initial size 4x4 and uninitialized entries + MatrixXd m2(4,4); // dynamic matrix with initial size 4x4 and uninitialized entries // notice how we are mixing fixed-size and dynamic-size types. cout << "In the top-left block, we put the matrix m shown above." << endl; |