#ifndef VECTORXD_H #define VECTORXD_H #include #include "matrixmxn.h" #define tmplx template #define tmpl template tmpl 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; }; tmplx using VectorXD = MatrixMxN; tmplx class MatrixMxN: public GenericVector> { public: MatrixMxN(); MatrixMxN(double k); MatrixMxN(const double scalars[X]); MatrixMxN(const VectorXD& other); protected: using GenericMatrix>::_scalars; }; //tmplx QDebug operator<<(QDebug dbg, const VectorXD& v); #include "vectorxd.hxx" #endif // VECTORXD_H