-
Notifications
You must be signed in to change notification settings - Fork 0
/
PieceWiseContinuePolynomial.h
62 lines (52 loc) · 1.59 KB
/
PieceWiseContinuePolynomial.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
54
55
56
57
58
59
60
61
62
/**
* \class PieceWiseContinuePolynomial
*
* \ingroup PackageName
* (Note, this needs exactly one \defgroup somewhere)
*
* \brief This is the function to call to perform the Least Square Regression by pieces of a given set of values
*
* \file PieceWiseContinuePolynomial.h
*
* \note Optional part of the project
*
* \author (last to touch it) $Author: DC & NL$
*
* \version $Revision: 1.0 $
*
* \date $Date: 2017.12.10 $
*
* Contact: [email protected] & [email protected]
*
*/
#ifndef PROJECT_PIECEWISE_CONTINUE_POLYNOMIAL_H
#define PROJECT_PIECEWISE_CONTINUE_POLYNOMIAL_H
#include <iostream>
#include <cassert>
#include <cmath>
#include "readFile.h"
using namespace std;
///@class
class PieceWiseContinuePolynomial {
public:
/**\brief Constructor
* \param data is the input value from the files
*/
explicit PieceWiseContinuePolynomial(Data const& data);
/**\brief
* \param degree degree of the polynome
* \param Intervale
* \param x_plot gives the x axis values of the plot
* \return matrix containing the solved linear system
*/
vector<vector<double>> solve_least_square_degree(size_t const& degree, size_t const& Intervalle, vector<double> const& x_plot) const;
/**\brief solves by using lagrange
* \param Intervalle
* \param x_plot gives the x axis values of the plot
* \return matrix containing the solved linear system
*/
vector<vector<double>> solve_lagrange_degree(size_t const& Intervalle, vector<double> const& x_plot) const;
private:
Data mData;
};
#endif //PROJECT_PIECEWISE_CONTINUE_POLYNOMIAL_H