Files
cpp/radio/Vector.hpp
T
jens e47fd4ce23 - added Matrix types
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@96 b431acfa-c32f-4a4a-93f1-934dc6c82436
2014-12-20 21:00:52 +00:00

46 lines
792 B
C++

/*
* File: Vector.hpp
* Author: jens
*
* Created on 19. Dezember 2014, 18:24
*/
#ifndef VECTOR_HPP
#define VECTOR_HPP
#include <Eigen/Dense>
#include "../radio/radio_types.h"
using namespace std;
using namespace Eigen;
#ifndef radio_float_t
#define radio_float_t float
#endif
namespace Radio
{
typedef radio_float_t RealScalar;
typedef complex<radio_float_t> ComplexScalar;
typedef Matrix<RealScalar, Dynamic, 1> RVec;
typedef Matrix<ComplexScalar, Dynamic, 1> CVec;
typedef Matrix<RealScalar, Dynamic, Dynamic> RMat;
typedef Matrix<ComplexScalar, Dynamic, Dynamic> CMat;
static ComplexScalar toComplexScalar(cpx_t v)
{
return ComplexScalar(v.real, v.imag);
}
static cpx_t toCpx(ComplexScalar v)
{
return Cpx(v.real(), v.imag());
}
} // ::Radio
#endif /* VECTOR_HPP */