Democracy 1 - 0 Dictatorship

After huge thread on eigen mailing list, it appears that i'm the
only one in favor of prefix Ei. Everybody else prefers namespace
Eigen like we did in Eigen 1. So, revert.

Also add a macro USING_EIGEN_DATA_TYPES that application programmers
can use to automatically do "using"on the Matrix class and its
matrix/vector typedefs:
using Eigen::Matrix;
using Eigen::Matrix2d;
using Eigen::Vector2d;
... (the list of typedefs is really long).

thanks to the suffixes, the Vector typedefs aren't really polluting.

CCMAIL:eigen@lists.tuxfamily.org

P.S. Danny, please skip this one :) I know you already reported the
namespace->prefix move, now that one would be too much noise :)
This commit is contained in:
Benoit Jacob
2007-10-11 20:14:01 +00:00
parent 3c98677376
commit 61de15f361
32 changed files with 531 additions and 497 deletions

View File

@@ -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;