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

more matrix type aliases

This commit is contained in:
Antonin Portelli 2014-04-07 15:56:39 +01:00
parent 749818d9cc
commit 10ca7d1d29
3 changed files with 11 additions and 5 deletions

View File

@ -24,6 +24,7 @@
#pragma GCC diagnostic ignored "-Wdeprecated-register" #pragma GCC diagnostic ignored "-Wdeprecated-register"
#include <LatAnalyze/Eigen/Dense> #include <LatAnalyze/Eigen/Dense>
#include <complex>
#include <memory> #include <memory>
#include <string> #include <string>
#include <sstream> #include <sstream>
@ -77,15 +78,19 @@ using MatExpr = Eigen::MatrixBase<Derived>;
template <typename T, int nRow = dynamic, int nCol = dynamic> template <typename T, int nRow = dynamic, int nCol = dynamic>
using Mat = Eigen::Matrix<T, nRow, nCol>; using Mat = Eigen::Matrix<T, nRow, nCol>;
typedef Mat<int> IMat; typedef Mat<int> IMat;
typedef Mat<double> DMatBase; typedef Mat<long int> LMat;
typedef Mat<double> DMatBase;
typedef Mat<std::complex<double>> CMat;
// vector types // vector types
template <typename T> template <typename T>
using Vec = Mat<T, dynamic, 1>; using Vec = Mat<T, dynamic, 1>;
typedef Vec<int> IVec; typedef Vec<int> IVec;
typedef Vec<double> DVec; typedef Vec<long int> LVec;
typedef Vec<double> DVec;
typedef Vec<std::complex<double>> CVec;
#define FOR_VEC(vec, i) for (Latan::Index i = 0; i < (vec).size(); ++i) #define FOR_VEC(vec, i) for (Latan::Index i = 0; i < (vec).size(); ++i)
#define FOR_ARRAY(ar, i) FOR_VEC(ar, i) #define FOR_ARRAY(ar, i) FOR_VEC(ar, i)

View File

@ -27,7 +27,7 @@
BEGIN_NAMESPACE BEGIN_NAMESPACE
/****************************************************************************** /******************************************************************************
* DMat sample class * * matrix sample class *
******************************************************************************/ ******************************************************************************/
class DMatSample: public Sample<DMat>, public IoObject class DMatSample: public Sample<DMat>, public IoObject
{ {

View File

@ -90,6 +90,7 @@ template <typename T>
using Sample = StatArray<T, SAMPLE_OFFSET>; using Sample = StatArray<T, SAMPLE_OFFSET>;
typedef Sample<double> DSample; typedef Sample<double> DSample;
typedef Sample<CMat> CMatSample;
/****************************************************************************** /******************************************************************************
* StatArray class template implementation * * StatArray class template implementation *