1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-10 00:45:36 +00:00

Matrix: improvement to support Eigen expressions

This commit is contained in:
Antonin Portelli 2014-02-12 18:37:29 +00:00
parent 4d25722736
commit 1a0cb2459e
2 changed files with 12 additions and 19 deletions

View File

@ -28,19 +28,11 @@ using namespace Latan;
******************************************************************************/
// constructors ////////////////////////////////////////////////////////////////
DMat::DMat(void)
: DMatBase()
{}
DMat::DMat(const DMatBase &m)
: DMatBase(m)
{}
DMat::DMat(const DMat &m)
: DMatBase(m)
: Base()
{}
DMat::DMat(const unsigned int nRow, const unsigned int nCol)
: DMatBase(nRow, nCol)
: Base(nRow, nCol)
{}
unsigned int DMat::getType(void) const

View File

@ -26,24 +26,25 @@
BEGIN_NAMESPACE
// Eigen aliases
typedef Eigen::MatrixXd DMatBase;
typedef Eigen::MatrixXcd CMatBase;
typedef Eigen::VectorXd DVecBase;
typedef Eigen::VectorXcd CVecBase;
class DMat: public DMatBase, public IoObject
class DMat: public Eigen::MatrixXd, public IoObject
{
private:
typedef Eigen::MatrixXd Base;
public:
// constructors
DMat(void);
DMat(const DMatBase &m);
DMat(const DMat &m);
DMat(const unsigned int nRow, const unsigned int nCol);
template <typename Derived>
DMat(const Eigen::EigenBase<Derived> &m);
// IO
virtual unsigned int getType(void) const;
};
template <typename Derived>
DMat::DMat(const Eigen::EigenBase<Derived> &m)
: Base(m)
{}
END_NAMESPACE
#endif // Latan_Mat_hpp_