-
Notifications
You must be signed in to change notification settings - Fork 0
/
NumericalIntegrationMethods.h
46 lines (35 loc) · 1.46 KB
/
NumericalIntegrationMethods.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
//==============================================================
// Filename : NumericalIntegrationMethods.h
// Authors : Jesper Schrijver, Nick in het Veld
// Version : v1
// License : MIT License
// Description : Class for combining and switching numerical
// integration methods - header
//==============================================================
// [BEGIN]: Prevent multiple inclusions of header
#ifndef NUMERICALINTEGRATIONMETHODS_H
#define NUMERICALINTEGRATIONMETHODS_H
// Libraries
#include "RungeKuttaFourNumericalIntegration.h"
#include "EulerNumericalIntegration.h"
// NumericalIntegrationBase-class
class NumericalIntegrationMethods : public RungeKuttaFourNumericalIntegration, public EulerNumericalIntegration {
public:
// Constructor (default)
NumericalIntegrationMethods() = default;
// Constructor (with arguments)
NumericalIntegrationMethods(double timeStep, double integrationType);
// Getters
bool getIntegrationType() { return m_integrationType; }
// Setters
void setIntegrationType(bool);
// Calculate
std::vector<double> calculateNextState(std::function<std::vector<double>(std::vector<double>, std::vector<double>, std::vector<double>, std::vector<double>, bool)>,
std::vector<double>, std::vector<double>, std::vector<double>,
std::vector<double>, bool);
private:
// Attributes
bool m_integrationType;
};
// [END]: Prevent multiple inclusions of header
#endif