1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-09-20 05:25:37 +01: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"
#include <LatAnalyze/Eigen/Dense>
#include <complex>
#include <memory>
#include <string>
#include <sstream>
@ -77,15 +78,19 @@ using MatExpr = Eigen::MatrixBase<Derived>;
template <typename T, int nRow = dynamic, int nCol = dynamic>
using Mat = Eigen::Matrix<T, nRow, nCol>;
typedef Mat<int> IMat;
typedef Mat<double> DMatBase;
typedef Mat<int> IMat;
typedef Mat<long int> LMat;
typedef Mat<double> DMatBase;
typedef Mat<std::complex<double>> CMat;
// vector types
template <typename T>
using Vec = Mat<T, dynamic, 1>;
typedef Vec<int> IVec;
typedef Vec<double> DVec;
typedef Vec<int> IVec;
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_ARRAY(ar, i) FOR_VEC(ar, i)

View File

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

View File

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