#ifndef VECTORXD_H #define VECTORXD_H #include #include "matrixmxn.h" #define uge_gv_tmpl_x template #define uge_gv_tmpl_xt template uge_gv_tmpl_xt class GenericVector: public GenericMatrix { public: using GenericMatrix::setScalar; T& setScalar(unsigned i, double value); using GenericMatrix::getScalar; double getScalar(unsigned i) const; double dotProduct(const T& other) const; T& crossProduct(const T& other); static T crossProduct(const T &v1, const T &v2); double norm() const; double operator[](unsigned i) const; protected: using GenericMatrix::_scalars; private: T* getThis() const; }; uge_gv_tmpl_x using VectorXD = MatrixMxN; uge_gv_tmpl_x class MatrixMxN: public GenericVector> { public: MatrixMxN(); MatrixMxN(double k); MatrixMxN(const double scalars[X]); MatrixMxN(const VectorXD& other); protected: using GenericMatrix>::_scalars; }; #include "vectorxd.hxx" #endif // VECTORXD_H