-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmath_ext.h
29 lines (26 loc) · 1.23 KB
/
math_ext.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
#ifndef MATH_EXT_H
#define MATH_EXT_H
#include <Eigen/Core>
#include <Eigen/Geometry>
using namespace Eigen;
class math_ext
{
public:
math_ext();
static MatrixXd cos_plus(const MatrixXd &dx1, const MatrixXd &dy1,
const MatrixXd &dx2, const MatrixXd &dy2);
static MatrixXd cos_subtract(const MatrixXd &dx1, const MatrixXd &dy1,
const MatrixXd &dx2, const MatrixXd &dy2);
static MatrixXd sin_plus(const MatrixXd &dx1, const MatrixXd &dy1,
const MatrixXd &dx2, const MatrixXd &dy2);
static MatrixXd sin_subtract(const MatrixXd &dx1, const MatrixXd &dy1,
const MatrixXd &dx2, const MatrixXd &dy2);
static VectorXd runge_kutta(const double &x0, const VectorXd &dif_1, const VectorXd &delta_x);
static VectorXd interpolate_y(const VectorXd &x_in, const VectorXd &y_in, const VectorXd &y_out);
private:
static void sin_and_cos(const MatrixXd &dx1, const MatrixXd &dy1,
const MatrixXd &dx2, const MatrixXd &dy2,
MatrixXd &sin_1, MatrixXd &cos_1,
MatrixXd &sin_2, MatrixXd &cos_2);
};
#endif // MATH_EXT_H