SDC C-Project CF Review 프로그램
LYW
2021-09-14 ffe71aadfdcb4a9ea2ac4d8d320983d42ef3cad5
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
#pragma once
 
 
#include "akLinker.h"
#include <vector>
 
namespace akSTL
{
    class akSTL_DLLSPEC CakInterpolation
    {
    public:
        struct _Data
        {
            _Data()
            {
                x = y = 0;
            }
            double x;
            double y;
        };
 
    public:
        CakInterpolation();
        ~CakInterpolation();
 
        //Æú¸®³ë¹Ì¾ó µ¥ÀÌÅÍ »ý¼º(rate:µ¥ÀÌÅÍ °£°Ý)
        void CaculationPolinomial(double min, double max, double rate);
        //Å¥ºò½ºÇöóÀΠµ¥ÀÌÅÍ »ý¼º(rate:Á¡°ú Á¡»çÀÌÀÇ µ¥ÀÌÅÍ °¹¼ö)
        void CaculationCubicSpline(double rate);
        //Linear(rate:Á¡°ú Á¡»çÀÌÀÇ µ¥ÀÌÅÍ °¹¼ö)
        void CaculationLinear(int step);
 
        void AddPoint(double x, double y);
        inline void ClearPoint(){m_vecInterPoint.clear();};
        
        inline _Data GetData(int index);
        inline int GetDataNum(){return (int)m_vecInterPoint.size();};
 
        
        
        
    protected:
        std::vector<_Data> m_vecOrgPoint;
        std::vector<_Data> m_vecInterPoint;
    private:
        void solveTridiag(double* khb, double* diag, double* khp, double* b, int n)    ;
    };
}