/
LightPredictionModule.h
53 lines (46 loc) · 1.18 KB
/
LightPredictionModule.h
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
/*
* LightPredictionModule.h
*
* Created on: Jun 12, 2014
* Author: sam
*/
#ifndef LIGHTPREDICTIONMODULE_H_
#define LIGHTPREDICTIONMODULE_H_
#include "Template.h"
#include "MPU9150Representation.h"
#include "ISL29023Representation.h"
#include "PredictionRepresentation.h"
#include "SupervisedAlgorithm.h"
#include "Projector.h"
#include "Math.h"
#include <cmath>
#if defined(ENERGIA)
#include "Energia.h"
#endif
MODULE(LightPredictionModule)
REQUIRES(MPU9150Representation) //
REQUIRES(ISL29023Representation) //
PROVIDES(PredictionRepresentation) //
END_MODULE
class LightPredictionModule: public LightPredictionModuleBase
{
private:
float gridResolution;
int nbTilings;
int nbInputs;
int memorySize;
int nbTrainingSample;
int nbMaxTrainingSamples;
//
RLLib::Random<float>* random;
RLLib::Vector<float>* input;
RLLib::Range<float>* inputRange;
RLLib::Hashing<float>* hashing;
RLLib::Projector<float>* projector;
RLLib::Autostep<float>* predictor;
public:
LightPredictionModule();
~LightPredictionModule();
void update(PredictionRepresentation& thePredictionRepresentation);
};
#endif /* LIGHTPREDICTIONMODULE_H_ */