⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shepard.h

📁 这是一个GPS相关的程序
💻 H
字号:
//---------------------------------------------------------
#ifndef HEADER_INCLUDED__Shepard_H
#define HEADER_INCLUDED__Shepard_H

//---------------------------------------------------------
#define abs(x)((x) >= 0 ?(x) : -(x))
#define dabs(x)(double)abs(x)

#ifndef min
	#define min(a, b)	((a) <= (b) ? (a) : (b))
#endif

#ifndef max
	#define max(a, b)	((a) >= (b) ? (a) : (b))
#endif

#define dmin(a, b)	(double)min(a, b)
#define dmax(a, b)	(double)max(a, b)


static int qshep2_(int *n, double *x, double *y, double *f, int *
            nq, int *nw, int *nr, int *lcell, int *lnext, double *
            xmin, double *ymin, double *dx, double *dy, double *rmax, double *rsq, double *a,
            int *ier);

static double qs2val_(double *px, double *py, int *n, double *x, double *y, double *f,
               int *nr, int *lcell, int *lnext, double *xmin, double *ymin,
               double *dx, double *dy, double *rmax, double *rsq, double *a);

class CShepard2d
{
public:
	       CShepard2d (void);
        ~CShepard2d (void);
        int Interpolate (double *X, double * Y, double * F, int N_Points, int Quadratic_Neighbors, int Weighting_Neighbors );
        void GetValue (double px, double py, double &q);
		void Set_Missing(double missing);
 
    protected:
        double *m_x, *m_y, *m_f;
        int *m_cells;
        int *m_next;
        double *m_rsq;
        double *m_a;
        double xmin, ymin, dx, dy, rmax;

        int m_nPoints;
        int m_nr;
        void Remove (void)
        {
            this->CShepard2d::~CShepard2d();
        }

        int GetGradient (double px, double py, double &q, double &qx, double &qy);
};


#endif // #ifndef HEADER_INCLUDED__Shepard_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -