LASP
1.0
Library for Acoustic Signal Processing
Loading...
Searching...
No Matches
lasp_mathtypes.h
Go to the documentation of this file.
1
#pragma once
2
#include <armadillo>
3
#include "
lasp_types.h
"
4
#include <cmath>
5
6
#if LASP_DOUBLE_PRECISION == 1
7
#define c_real creal
8
#define c_imag cimag
9
#define d_abs fabs
10
#define c_abs cabs
11
#define c_conj conj
12
#define d_atan2 atan2
13
#define d_acos acos
14
#define d_sqrt sqrt
15
#define c_exp cexp
16
#define d_exp exp
17
#define d_sin sin
18
#define d_cos cos
19
#define d_pow pow
20
#define d_log10 log10
21
#define d_ln log
22
#define d_epsilon (DBL_EPSILON)
23
24
#else
// LASP_DOUBLE_PRECISION not defined
25
#define c_conj conjf
26
#define c_real crealf
27
#define c_imag cimagf
28
#define d_abs fabsf
29
#define c_abs cabsf
30
#define d_atan2 atan2f
31
#define d_acos acosf
32
#define d_sqrt sqrtf
33
#define c_exp cexpf
34
#define d_exp expf
35
#define d_sin sinf
36
#define d_cos cosf
37
#define d_pow powf
38
#define d_log10 log10f
39
#define d_ln logf
40
#define d_epsilon (FLT_EPSILON)
41
42
#endif
// LASP_DOUBLE_PRECISION
43
44
using
vd
= arma::Col<d>;
45
using
vrd
= arma::Row<d>;
46
using
vc
= arma::Col<c>;
47
using
vrc
= arma::Row<c>;
48
using
dmat
= arma::Mat<d>;
49
using
cmat
= arma::Mat<c>;
50
using
ccube
= arma::Cube<c>;
51
using
dcube
= arma::Cube<d>;
52
53
const
d
number_pi
= arma::datum::pi;
vrd
arma::Row< d > vrd
Definition
lasp_mathtypes.h:45
vrc
arma::Row< c > vrc
Definition
lasp_mathtypes.h:47
vd
arma::Col< d > vd
Definition
lasp_mathtypes.h:44
dmat
arma::Mat< d > dmat
Definition
lasp_mathtypes.h:48
vc
arma::Col< c > vc
Definition
lasp_mathtypes.h:46
dcube
arma::Cube< d > dcube
Definition
lasp_mathtypes.h:51
ccube
arma::Cube< c > ccube
Definition
lasp_mathtypes.h:50
number_pi
const d number_pi
Definition
lasp_mathtypes.h:53
cmat
arma::Mat< c > cmat
Definition
lasp_mathtypes.h:49
lasp_types.h
src
lasp
dsp
lasp_mathtypes.h
Generated by
1.9.8