~ubuntu-branches/ubuntu/trusty/eigen3/trusty-proposed

« back to all changes in this revision

Viewing changes to doc/I00_CustomizingEigen.dox

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2013-05-06 20:58:32 UTC
  • mfrom: (8.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130506205832-2dxl1uysxuaredbf
Tags: 3.1.3-1
* [52a3539] Update dates in copyright.
* [f22ef64] Return FTBFS if the autotest fails.
* [60b2388] Respect nocheck option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
several layers of heritage such as  MyVerySpecificVector1,MyVerySpecificVector1 -> MyVector1 -> Matrix and.
84
84
MyVerySpecificVector3,MyVerySpecificVector4 -> MyVector2 -> Matrix.
85
85
 
86
 
In order for your object to work within the Eigen framework, you need to
 
86
In order for your object to work within the %Eigen framework, you need to
87
87
define a few members in your inherited class.
88
88
 
89
89
Here is a minimalistic example:\n
93
93
public:
94
94
    MyVectorType(void):Eigen::VectorXd() {}
95
95
 
96
 
    // You need to define this for your object to work
97
96
    typedef Eigen::VectorXd Base;
 
97
 
 
98
    // This constructor allows you to construct MyVectorType from Eigen expressions
 
99
    template<typename OtherDerived>
 
100
    MyVectorType(const Eigen::MatrixBase<OtherDerived>& other)
 
101
        : Eigen::Vector3d(other)
 
102
    { }
 
103
 
 
104
    // This method allows you to assign Eigen expressions to MyVectorType
98
105
    template<typename OtherDerived>
99
106
    MyVectorType & operator= (const Eigen::MatrixBase <OtherDerived>& other)
100
107
    {