From a8b9744f549412611310e75b545cf77d9345e3fe Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Mon, 30 May 2022 10:23:47 +0000 Subject: [PATCH] - prepared to use armadillo matrix lib git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@897 b431acfa-c32f-4a4a-93f1-934dc6c82436 --- radio/Vector.hpp | 59 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 11 deletions(-) diff --git a/radio/Vector.hpp b/radio/Vector.hpp index 1b0d08c..bf66609 100644 --- a/radio/Vector.hpp +++ b/radio/Vector.hpp @@ -8,31 +8,68 @@ #ifndef _RADIO_VECTOR_HPP_ #define _RADIO_VECTOR_HPP_ -#include -using namespace Eigen; +#define VECTOR_USE_EIGEN +//#define VECTOR_USE_ARMADILLO #include -using namespace std; - #include -using Eigen::Dense; - #ifndef radio_float_t #define radio_float_t float #endif +#ifdef VECTOR_USE_EIGEN +#include +#endif + +#ifdef VECTOR_USE_ARMADILLO +#include +#endif + namespace Radio { typedef radio_float_t RealScalar; -typedef complex ComplexScalar; +typedef std::complex ComplexScalar; -typedef Matrix RVec; -typedef Matrix CVec; +#ifdef VECTOR_USE_EIGEN -typedef Matrix RMat; -typedef Matrix CMat; +typedef Eigen::Matrix RVec; +typedef Eigen::Matrix CVec; + +typedef Eigen::Matrix RMat; +typedef Eigen::Matrix CMat; + +typedef Eigen::Map RMap; +#endif + +#ifdef VECTOR_USE_ARMADILLO +#if 1 +template +class Vec : public arma::Col +{ + public: + void setZero() + { + + } +}; +class RVec : public Vec +{ +}; + +class CVec : public Vec +{ +}; +#endif +//typedef arma::col RVec; +//typedef arma::col CVec; + +typedef arma::Mat RMat; +typedef arma::Mat CMat; + +typedef arma::Map RMap; +#endif static ComplexScalar toComplexScalar(cpx_t v) {