| class MyVectorType : public Eigen::VectorXd |
| MyVectorType(void):Eigen::VectorXd() {} |
| // This constructor allows you to construct MyVectorType from Eigen expressions |
| template<typename OtherDerived> |
| MyVectorType(const Eigen::MatrixBase<OtherDerived>& other) |
| // This method allows you to assign Eigen expressions to MyVectorType |
| template<typename OtherDerived> |
| MyVectorType& operator=(const Eigen::MatrixBase <OtherDerived>& other) |
| this->Eigen::VectorXd::operator=(other); |
| MyVectorType v = MyVectorType::Ones(4); |
| std::cout << v.transpose() << std::endl; |