Spectrum.hh
2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: Spectrum.hh
* Author: hacene
*
* Created on December 31, 2020, 10:14 AM
*/
#ifndef SPECTRUM_HH
#define SPECTRUM_HH
#include "Parameter.hh"
#include "ParamData.hh"
#include "DataTypeMath.hh"
#include "Operation.hh"
#include <iterator>
namespace AMDA {
namespace Parameters {
namespace Spectrum {
using namespace std;
template<typename DataType, OutputType>
class SpectrumBase : public Operation {
public:
/**
* @brief Constructor.
* @details Create the ParamData type of the input ParamData.
*/
Spectrum(Process& pProcess, ParamDataSpec<DataType >¶mInput, std::string sampling="center") :
Operation(pProcess),
_paramInput(paramInput),
_paramOutput(new ParamDataSpec<std::vector<OutputType>>()),
_sampling(sampling){
_paramDataOutput = _paramOutput;
};
virtual ~Spectrum() {
}
/**
* @overload Operation::write(ParamDataIndexInfo &pParamDataIndexInfo)
*/
void write(ParamDataIndexInfo &pParamDataIndexInfo) {
for (unsigned int _index = pParamDataIndexInfo._startIndex;
_index < pParamDataIndexInfo._startIndex + pParamDataIndexInfo._nbDataToProcess;
++_index) {
DataType in = _paramInput.get(_index);
double crtTime = _paramInput.getTime(_index);
}
}
protected:
ParamDataSpec<DataType>& _paramInput;
ParamDataSpec<std::vector<OutputType>>* _paramOutput;
std::string sampling;
};
} // end Spectrum
} // end Parameters
} // end AMDA
#endif /* SPECTRUM_HH */