yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #03225
Re: WM3 -> Eigen migration
> I have just committed some changes.
Looking at your code:
1. why you duplicate the vector (Vector3r::value)???? You can get all
you need just by using this pointer, or omitting the instance
altogether:
Real X(){ return x(); }
Real X(){ return this->x(); }
(don't forget derived class inherits all that from its parent class)
2. I don't think we want to initialize Vector3r to zeros in the default
ctor; it is used so frequently that it would hurt performance. (Normally
the object is constructed and assigned a value right away).
> I need to rewrite all operators for that?
You have to try if base class operators will do (they should be picked
up by the compiler); I assume their functionality is the same in most
cases (like Vector3r+Vector3r), so you have nothing to do in that case.
Some operators might need wrapping, such as quaternion*vector products,
I think.
For the I/O operators, see if eigen defines them already; then you don't
need to duplicate that.
Cheers, V
Follow ups
References
-
WM3 -> Eigen migration
From: Anton Gladky, 2010-01-21
-
Re: WM3 -> Eigen migration
From: Anton Gladky, 2010-01-23
-
Re: WM3 -> Eigen migration
From: Václav Šmilauer, 2010-01-23
-
Re: WM3 -> Eigen migration
From: Anton Gladky, 2010-01-23
-
Re: WM3 -> Eigen migration
From: Anton Gladky, 2010-01-28
-
Re: WM3 -> Eigen migration
From: Václav Šmilauer, 2010-01-29
-
Re: WM3 -> Eigen migration
From: Anton Gladky, 2010-02-01
-
Re: WM3 -> Eigen migration
From: Václav Šmilauer, 2010-02-01
-
Re: WM3 -> Eigen migration
From: Anton Gladky, 2010-02-01
-
Re: WM3 -> Eigen migration
From: Václav Šmilauer, 2010-02-01
-
Re: WM3 -> Eigen migration
From: Anton Gladky, 2010-02-01