【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.18.12 ocmath_modified_shepard_eval
Contents
Description
This subroutine computes the value at given points using the modified shepard's method.
Syntax
int ocmath_modified_shepard_eval( ocmath_ModShepard_Struct * comm, int n, double * px, double * py, double * pf )
Parameters
- comm
- [input] the structure computed from ocmath_modified_shepard_interpolant()
- n
- [input] number of nodes and values defining Q
- px
- [input]x cartesian coordinates of the points at which q are to be evaluated
- py
- [input]y cartesian coordinates of the points at which q are to be evaluated
- pf
- [output]value of Q at (px, py)
Return
Err_Intp_No_Error: No error occur;
Err_Intp_Mem_Fail: Fails to allocate memory;
OR error from ocmath_renka_cline_interpolation().
Examples
EX1
#include <wks2mat.h> int ocmath_Modified_Shepard_ex1() { double x1[10], y1[10], z1[10] ; int n = 10 ; for(int ii = 0; ii < n; ii++) { x1[ii] = ii; y1[ii] = 1; z1[ii] = ii+1; } ocmath_ModShepard_Opt optional; optional.nq = 5; optional.nw = 7; ocmath_ModShepard_Struct comm; int nRet = ocmath_modified_shepard_interpolant(n, x1, y1, z1,&comm, NULL); if(nRet < 0) return 0; double px[5] = { .1,.3,.5,.7,.9 }; double py[5] = { .2,.4,.6,.8, .4 }; int m = 5; double pf[5]; nRet = ocmath_modified_shepard_eval(&comm, m, px, py, pf); if(nRet <0) return 0; return 1; }
Remark
See Also
Header to Include
wks2mat.h