Functions
exampleAMA_MltvGrd.c File Reference
#include <exampleAMA_MltvGrd.h>

Functions

int main (int argc, char **argv)
 Approximation and Interpolation of Multivariate Gridded Data More...
 
long int exampleAMA_MltvGrdArguments (int argc, char **argv, long int *appindx, char *approx, char *datfile)
 Parse main() programs parameters. More...
 
long int exampleAMA_MltvGrdError (AMA_OPTIONS *options, long int nind, long int *ng, double **x, double *z, AMA_SPLINE *spline)
 Produce absolute error table for AMA Spline Library Multivariate Gridded Data Functions. More...
 
long int exampleAMA_MltvGrdWrite (AMA_OPTIONS *options, const char *approx, const char *datname, AMA_SPLINE *spline)
 Write spline approximation to ascii file. More...
 

Function Documentation

long int exampleAMA_MltvGrdArguments ( int  argc,
char **  argv,
long int *  appindx,
char *  approx,
char *  datfile 
)

Parse main() programs parameters.

Parameters
argc[in] main() program argc parameter.
argv[in] main() program argv parameter.
appindx[out] Approximation index.
approx[out] Approximation function.
datfile[out] The data file name exampleAMA_MltvGrd_datname.dat.
Returns
Success/Error Code.

Documented 111014

358 {
359 /* -------------------
360  ... local variables
361  ------------------- */
362 
363  const char *apptyp[5] = { "AMA_MltvGrdApprox", "AMA_MltvGrdInterp", "AMA_MltvGrdLstsqr", "AMA_MltvGrdMonoApprox", "AMA_MltvGrdMonoInterp" };
364 
365 /* ---------------------------------
366  ... check program input arguments
367  --------------------------------- */
368 
369  if ( argc == 3 )
370  {
371 /* ... check approximation type */
372 
373  for ( *appindx = 0; *appindx < 5; (*appindx)++ )
374  if ( !strcmp ( argv[1], apptyp[*appindx] ) ) break;
375 
376  if ( *appindx == 5 )
377  {
378  fprintf ( stderr, "Invalid value of approx: Equals %s; Must be one of AMA_MltvGrdApprox, AMA_MltvGrdInterp, AMA_MltvGrdLstsqr, AMA_MltvGrdMonoApprox or AMA_MltvGrdMonoInterp.\n", argv[1] );
379  return AMA_INPUT_ERROR;
380  }
381  }
382  else
383  {
384  fprintf ( stderr, "Usage is exampleAMA_MltvGrd approx datfile; where approx is one of AMA_MltvGrdApprox, AMA_MltvGrdInterp, AMA_MltvGrdLstsqr, AMA_MltvGrdMonoApprox or AMA_MltvGrdMonoInterp.\n" );
385  return AMA_INPUT_ERROR;
386  }
387 
388  strcpy ( approx , argv[1] );
389  strcpy ( datfile, argv[2] );
390 
391  return AMA_NO_ERROR;
392 }
#define AMA_NO_ERROR
#define AMA_INPUT_ERROR
long int exampleAMA_MltvGrdError ( AMA_OPTIONS options,
long int  nind,
long int *  ng,
double **  x,
double *  z,
AMA_SPLINE spline 
)

Produce absolute error table for AMA Spline Library Multivariate Gridded Data Functions.

This function writes the absolute error table for AMA Spline Library functions which compute spline approximations of independent variable data ${\bf X}\in\Re^n$ and dependent variable data ${\bf Z}\in\Re^1$ to stdout. The independent variable data defines the rectilinear grid

\[ (x_{1,1},x_{1,2},\cdots,x_{1,N^g_1-1},x_{1,N^g_1})\times\cdots\times(x_{n,1},x_{n,2},\cdots,x_{n,N^g_n-1},x_{n,N^g_n}) \]

where $N^g_k\ge 2$ and $1\le k\le n$. The dependent variable data lies on the grid and is given as $z_{\ell_1,\cdots,\ell_n}$ for $\ell_1=1,\ldots,N^g_1,\cdots,\ell_n=1,\ldots,N^g_n$; that is, there are $N=\prod_{k=1}^nN^g_k$ dependent variable values. This function does the following:

  • Computes the value of the spline approximation, see AMA_SplineValue().
  • Computes $\vert s_1(x_{1,\ell_1},\cdots,x_{n,\ell_n}) - z_{\ell_1,\cdots,\ell_n}\vert$, for $\ell_1=1,\ldots,N^g_1,\cdots,\ell_n=1,\ldots,N^g_n$ and writes it to stdout.
  • Writes the minimum, maximum and sum of squares errors to stdout.

Parameter Note: In the parameter definitions given below the limits on $k$ are $1\le k\le n$ and k = $k-1$.

Parameters
options[in] Pointer to AMA_OPTIONS. Should be initialized with AMA_Options().
nind[in] The number of independent variables $n$.
ng[in] Array of size nind containing the number of points $N^g_k$ where ng[k] $= N^g_k$.
x[in] Array of size nind containing arrays of size ng[k] where x[k] contains the independent variable data $x_{k,\ell_k}$, $\ell_k=1,\ldots,N^g_k$.
z[in] Array of size $N$ containing the dependent variable data $z_{\ell_1,\cdots,\ell_n}$, for $\ell_1=1,\ldots,N^g_1,\cdots,\ell_n=1,\ldots,N^g_n$.
spline[in] Pointer to AMA_SPLINE containing the spline approximation.
Returns
Success/Error Code

Documented 021616

430 {
431 /* -------------------
432  ... local variables
433  ------------------- */
434 
435  AMA_ERROR_INIT ( "exampleAMA_MltvGrdError" )
436 
437  long int jndex[AMA_MXNIND];
438  long int k;
439  long int l;
440  long int n = 1;
441 
442  double abserr;
443  double dbltwo = 2.0;
444  double rmax = 0.0;
445  double rmin = DBL_MAX;
446  double sos = 0.0;
447  double sval;
448  double xval[AMA_MXNIND];
449 
450 /* --------------------------
451  ... compute absolute error
452  -------------------------- */
453 
454  for ( k = 0; k < nind; k++ ) n *= ng[k];
455 
456  AMA_InitializeJndex ( nind, jndex );
457 
458  fprintf ( stdout, "\n\n" );
459 
460  for ( k = 0; k < nind; k++ ) fprintf ( stdout, " x_%ld ", k );
461  fprintf ( stdout, " z(x) s(x) |s(x)-z(x)|\n " );
462 
463  for ( k = 0; k < nind; k++ ) fprintf ( stdout, "---------------" );
464  fprintf ( stdout, "-----------------------------------------------------\n" );
465 
466  for ( l = 0; l < n; l++ )
467  {
468  AMA_IncrementJndex ( nind, ng, jndex );
469 
470  for ( k = 0; k < nind; k++ ) xval[k] = x[k][jndex[k]];
471  AMA_FUNCTN_ERROR ( AMA_SplineValue ( options, xval, spline, &sval ) )
472 
473  abserr = fabs ( sval - z[l] );
474  for ( k = 0; k < nind; k++ )fprintf ( stdout, " %15.8e", x[k][jndex[k]] );
475  fprintf ( stdout, " %15.8e %15.8e %15.8e\n", z[l], sval, abserr );
476 
477  rmin = NSPLSQ_MIN ( rmin, abserr );
478  rmax = NSPLSQ_MAX ( rmax, abserr );
479 
480  sos += pow ( abserr, dbltwo );
481  }
482 
483  fprintf ( stdout, "\n Residual Summary\n" );
484 
485  fprintf ( stdout, " -------------------------------\n" );
486  fprintf ( stdout, " Minimum Error: %+15.7e\n" , rmin );
487  fprintf ( stdout, " Maximum Error: %+15.7e\n" , rmax );
488  fprintf ( stdout, " Sum of Squares: %+15.7e\n\n", sos );
489 
490  return AMA_SuccessErrorCode ( options, ier, inputFatal );
491 }
long int exampleAMA_MltvGrdWrite ( AMA_OPTIONS options,
const char *  approx,
const char *  datname,
AMA_SPLINE spline 
)

Write spline approximation to ascii file.

This function writes a spline approximation to the ascii file datname_approx.spl.

Parameters
options[in] Pointer to AMA_OPTIONS initialized with AMA_Options().
approx[in] Approximation function. Should be one of AMA_MltvGrdApprox, AMA_MltvGrdInterp, AMA_MltvGrdLstsqr, AMA_MltvGrdMonoApprox or AMA_MltvGrdMonoInterp.
datname[in] The component datname of the data file name exampleAMA_MltvGrd_datname.dat.
spline[in] Pointer to AMA_SPLINE containing the spline approximation.
Returns
Success/Error Code

Documented 111014

511 {
512 /* -------------------
513  ... local variables
514  ------------------- */
515 
516  AMA_ERROR_INIT ( "exampleAMA_MltvGrdWrite" )
517 
518  char splfile[AMA_MXCHAR];
519 
520 /* ------------------------------
521  ... write spline to ascii file
522  ------------------------------ */
523 
524  sprintf ( splfile, "%s_%s.spl", datname, approx );
525 
526  AMA_FUNCTN_ERROR ( AMA_SplineWrite ( options, splfile, "ascii", spline ) )
527 
528  return AMA_SuccessErrorCode ( options, ier, inputFatal );
529 }
int main ( int  argc,
char **  argv 
)

Approximation and Interpolation of Multivariate Gridded Data

This program illustrates usage of the AMA Spline Library's Multivariate Gridded Data Functions which it employs to compute spline approximations of independent variable data ${\bf X}\in\Re^n$ and dependent variable data ${\bf Z}\in\Re^1$. The independent variable data defines the rectilinear grid $(x_{1,1},x_{1,2},\cdots,x_{1,N^g_1-1},x_{1,N^g_1})\times\cdots\times(x_{n,1},x_{n,2},\cdots,x_{n,N^g_n-1},x_{n,N^g_n})$ where $N^g_k\ge 2$ and $1\le k\le n$. The dependent variable data lies on the grid and is given as $z_{\ell_1,\cdots,\ell_n}$ for $\ell_1=1,\ldots,N^g_1,\cdots,\ell_n=1,\ldots,N^g_n$; that is, there are $N=\prod_{k=1}^nN^g_k$ dependent variable values. Similarly, the approximation tolerances $\epsilon_{\ell_1,\cdots,\ell_n}$ for $\ell_1=1,\ldots,N^g_1,\cdots,\ell_n=1,\ldots,N^g_n$ lie on the grid.

Its usage is:

exampleAMA_MltvGrd approx datfile

where approx is one of AMA_MltvGrdApprox, AMA_MltvGrdInterp, AMA_MltvGrdLstsqr, AMA_MltvGrdMonoApprox or AMA_MltvGrdMonoInterp. Based on the value of approx this program invokes one of the following five functions:

The argument datfile must be of the form exampleAMA_MltvGrd_datname.dat where datname is any valid string. The file consists of a data section and may contain several, optional, approximation option sections. The Data section must preceed the approximation options sections and has the following structure:

\[ \begin{array}{lll} {\bf Data} & & \cr {\bf Nind:}n & & \cr {\bf Degree:}d_1 & & \cr \vdots & & \cr {\bf Degree:}d_n & & \cr {\bf Ng:}N^g_1 & & \cr x_{1,1} & & \cr \vdots & & \cr x_{1,N^g_1} & & \cr {\bf Ng:}N^g_n & & \cr x_{n,1} & & \cr \vdots & & \cr x_{n,N^g_n} & & \cr {\bf Z} &{\bf Epsilon} &{\bf Wht} \cr z_{1,\cdots,1} &\epsilon_{1,\cdots,1} &w_{1,\cdots,1} \cr z_{2,\cdots,1} &\epsilon_{2,\cdots,1} &w_{2,\cdots,1} \cr \vdots &\vdots &\vdots \cr z_{N^g_1,\cdots,1} &\epsilon_{N^g_1,\cdots,1} &w_{N^g_1,\cdots,1} \cr \vdots &\vdots &\vdots \cr z_{1,\cdots,N^g_n} &\epsilon_{1,\cdots,N^g_n} &w_{1,\cdots,N^g_n} \cr z_{2,\cdots,N^g_n} &\epsilon_{2,\cdots,N^g_n} &w_{2,\cdots,N^g_n} \cr \vdots &\vdots &\vdots \cr z_{N^g_1,\cdots,N^g_n} &\epsilon_{N^g_1,\cdots,N^g_n} &w_{N^g_1,\cdots,N^g_n} \cr {\bf End\_Data} & & \cr \end{array} \]

where the Epsilon and Wht columns are optional. The data must satisfy the following conditions:

  • $2\le n\le$ AMA_MXNIND;
  • $1\le d_k \le 5$, for $1\le k\le n$;
  • $N^g_k\ge 2$, for $1\le k\le n$;
  • the independent variable data $x_{k,\ell_k}$, for $\ell_k=1,\cdots,N^g_k$ and $1\le k\le n$, must be in increasing order;
  • the approximation tolerances must satisfy $\epsilon_{\ell_1,\cdots,\ell_n}\ge 0.0$, for $\ell_1=1,\ldots,N^g_1,\cdots,\ell_n=1,\ldots,N^g_n$;
  • the weights must satisfy $w_{\ell_1,\cdots,\ell_n}\ge 0.0$, for $\ell_1=1,\ldots,N^g_1,\cdots,\ell_n=1,\ldots,N^g_n$.

Following the Data section may be one or more of the Bounds, Least_Squares or Monotonicity sections. If an approximation options section is not defined, then this function sets the options to their default values. See Table Approximation Options Defaults for a list of Multivariate Gridded Data Functions approximation options default values.

The Bounds section specifies the lower and upper bounds employed by AMA_MltvGrdLstsqr(). It has the following structure:

\[ \begin{array}{ll} {\bf Bounds} & \cr {\bf Lwrbnd:}\alpha_l &{\bf Uprbnd:}\alpha_u \cr {\bf End\_Bounds} & \cr \end{array} \]

and its options must satisfy the following conditions:

The lower bound is read as a string lwrstr and based on the value of lwrstr the value of $\alpha_l$ is set as follows:

  • If lwrstr equals infbnd, then $\alpha_l = -\alpha_\infty$ where $\alpha_\infty$ = AMA_SplineInfbnd(); or,
  • If lwrstr equals zmin , then $\alpha_l = \min_{\ell_1,\cdots,\ell_n}\lbrace{z_{\ell_1,\cdots,\ell_n}\rbrace}$.
  • Otherwise, $\alpha_l =$ atof(lwrstr).

Similarly, the upper bound is read as a string uprstr and based on the value of uprstr the value of $\alpha_u$ is set as follows:

  • If uprstr equals infbnd, then $\alpha_u = \alpha_\infty$ where $\alpha_\infty$ = AMA_SplineInfbnd(); or,
  • If uprstr equals zmax , then $\alpha_u = \max_{\ell_1,\cdots,\ell_n}\lbrace{z_{\ell_1,\cdots,\ell_n}\rbrace}$.
  • Otherwise, $\alpha_u =$ atof(uprstr).

The Least_Squares section specifies the approximation options and knots employed by AMA_MltvGrdLstsqr(). It has the following structure:

\[ \begin{array}{ll} {\bf Least\_Squares} & \cr {\bf Theta:}\theta &{\bf Minorm:}\rm minorm \cr {\bf Mlamda:}m_1 & \cr \lambda^o_{1,1} & \cr \lambda^o_{1,2} & \cr \vdots & \cr \lambda^o_{1,m_1} & \cr \vdots & \cr {\bf Mlamda:}m_n & \cr \lambda^o_{n,1} & \cr \lambda^o_{n,2} & \cr \vdots & \cr \lambda^o_{n,m_n} & \cr {\bf End\_Least\_Squares} & \cr \end{array} \]

and its options must satisfy the following conditions:

  • $0.0\le\theta< 1.0$;
  • ${\rm minorm}$ must be Enabled or Disabled;
  • $m_k\ge 2$, for $1\le k\le n$;
  • the knots $\lambda^o_{k,i}$, for $i=1,\cdots,m_k$ and $1\le k\le n$, must be in increasing order;
  • $\lambda^o_{k,1} \le x_{k,1}$ and $\lambda^o_{k,m_k} \ge x_{k,N^g_k}$, for all $1\le k\le n$.

The Monotonicity section specifies the monotonicity constraints and continuity conditions employed by AMA_MltvGrdMonoApprox() and AMA_MltvGrdMonoInterp(). It has the the following structure:

\[ \begin{array}{llll} {\bf Monotonicity} & & & \cr {\bf Monpos:\rm monpos[1]} &{\bf Monneg:\rm monneg[1]} &{\bf Monzer:\rm monzer[1]} &{\bf Concnd:\rm concnd[1]} \cr \vdots &\vdots &\vdots &\vdots \cr {\bf Monpos:\rm monpos[n]} &{\bf Monneg:\rm monneg[n]} &{\bf Monzer:\rm monzer[n]} &{\bf Concnd:\rm concnd[n]} \cr {\bf End\_Monotonicity} & & & \cr \end{array} \]

and its options must satisfy the following conditions:

  • the positive monotonicity constraint flag ${\rm monpos}[k]$, negative monotonicity constraint flag ${\rm monneg}[k]$ and zero monotonicity constraint flag ${\rm monzer}[k]$ must be Enabled or Disabled, for $1\le k\le n$;
  • the continuity condition ${\rm concnd}[k]$ must be Full or Reduced, for $1\le k\le n$;

The bold keywords are case sensitive and the string values for the approximation options are case insensitive.

The data is used by all the functions; but, the weights $w_{\ell_1,\cdots,\ell_n}$, for $\ell_1=1,\ldots,N^g_1,\cdots,\ell_n=1,\ldots,N^g_n$, are used only if approx equals AMA_MltvGrdLstsqr and the approximation tolerances $\epsilon_{\ell_1,\cdots,\ell_n}$, for $\ell_1=1,\ldots,N^g_1,\cdots,\ell_n=1,\ldots,N^g_n$, are used only if approx equals AMA_MltvGrdApprox or AMA_MltvGrdMonoApprox. The monotonicity constraint flags and continuity conditions are used if approx equals AMA_MltvGrdMonoApprox or AMA_MltvGrdMonoInterp. The knots $\lambda^o_{k,i}$, for $i=1,\cdots,m_k$ and $1\le k\le n$, lower bound $\alpha_l$, upper bound $\alpha_u$, penalty term weight $\theta$ and the minimum norm optimization flag are used only if approx equals AMA_MltvLstsqr.

This program does the following:

Returns
0 if successfull; 1 otherwise.
Note
If this program fails it does not free its internal memory.

Documented 110215

174 {
175 /* -------------------
176  ... local variables
177  ------------------- */
178 
179  char approx[AMA_MXCHAR];
180  char datfile[AMA_MXCHAR];
181  char datname[AMA_MXCHAR];
182 
183  long int appindx;
184 
185 /* -----------------------------
186  ... data and spline variables
187  ----------------------------- */
188 
189  AMA_OPTIONS *options = NULL;
190 
191  long int degree[AMA_MXNIND];
192  long int ng[AMA_MXNIND];
193  long int mlamda[AMA_MXNIND];
194 
195  long int nind;
196 
197  double *epsilon = NULL;
198  double **lamda = NULL;
199  double theta = 0.0;
200  double *wht = NULL;
201  double **x = NULL;
202  double *z = NULL;
203 
204  AMA_SPLINE *spline = NULL;
205 
206 /* ---------------
207  ... check usage
208  --------------- */
209 
210  if ( exampleAMA_MltvGrdArguments ( argc, argv, &appindx, approx, datfile ) ) exit(1);
211 
212 /* ---------------------------------------
213  ... allocate and initialize AMA_OPTIONS
214  --------------------------------------- */
215 
216  if ( AMA_Options ( &options ) )
217  {
218  fprintf ( stderr, " exampleAMA_MltvGrd: Error initializing AMA_OPTIONS.\n" );
219  exit(1);
220  }
221 
222 /* -------------
223  ... read data
224  ------------- */
225 
226 /* ... check data file name */
227 
228  if ( AMA_DataFile ( options, datfile, "exampleAMA_MltvGrd_", datname ) )
229  {
230  fprintf ( stderr, " exampleAMA_MltvGrd: Invalid data file name.\n" );
231  exit(1);
232  }
233 
234 /* ... read data */
235 
236  if ( AMA_MltvGrdData ( options, datfile, &nind, degree, ng, &x, &z, &epsilon, &wht, &theta, mlamda, &lamda ) )
237  {
238  fprintf ( stderr, " exampleAMA_MltvGrd: Error reading data.\n" );
239  exit(1);
240  }
241 
242 /* ------------------
243  ... enable options
244  ------------------ */
245 
246 /* ... enable output */
247 
248  AMA_OptionsSetOutputFlag ( options, 1 );
249 
250 /* ... write options */
251 
252  if ( AMA_OptionsWrite ( options ) )
253  {
254  fprintf ( stderr, "Error writing AMA_OPTIONS.\n" );
255  exit(1);
256  }
257 
258 /* --------------------------------------------
259  ... call user specified multivariate routine
260  -------------------------------------------- */
261 
262  switch ( appindx )
263  {
264  case 0:
265  AMA_MltvGrdApprox ( options, nind, ng, x, z, epsilon, degree, &spline );
266  break;
267 
268  case 1:
269  AMA_MltvGrdInterp ( options, nind, ng, x, z, degree, &spline );
270  break;
271 
272  case 2:
273  AMA_MltvGrdLstsqr ( options, nind, ng, x, z, wht, degree, mlamda, lamda, theta, &spline );
274  break;
275 
276  case 3:
277  AMA_MltvGrdMonoApprox ( options, nind, ng, x, z, epsilon, degree, &spline );
278  break;
279 
280  case 4:
281  AMA_MltvGrdMonoInterp ( options, nind, ng, x, z, degree, &spline );
282  break;
283  }
284 
285 /* -----------------------------------------------------------
286  ... write absolute error table, VisIt files and spline file
287  ----------------------------------------------------------- */
288 
289  if ( options->ier == AMA_NO_ERROR || options->ier == AMA_PROCESS_ERROR || options->ier == AMA_WARNING_ERROR )
290  {
291  if ( exampleAMA_MltvGrdError ( options, nind, ng, x, z, spline ) )
292  {
293  fprintf ( stderr, " exampleAMA_MltvGrd: Error writing error table.\n" );
294  exit(1);
295  }
296 
297  if ( exampleAMA_MltvGrdWrite ( options, approx, datname, spline ) )
298  {
299  fprintf ( stderr, " exampleAMA_MltvGrd: Error writing spline file.\n" );
300  exit(1);
301  }
302 
303  if ( AMA_VisitMltvGrd ( options, approx, datname, nind, ng, x, z, spline ) )
304  {
305  fprintf ( stderr, " exampleAMA_MltvGrd: Error writing VisIt files.\n" );
306  exit(1);
307  }
308 
309  if ( AMA_SplineFree ( options, &spline ) )
310  {
311  fprintf ( stderr, " exampleAMA_MltvGrd: Error freeing spline.\n" );
312  exit(1);
313  }
314  }
315  else
316  {
317  fprintf ( stderr, " exampleAMA_MltvGrd: Approximation failed: ier = %ld\n", options->ier );
318  exit(1);
319  }
320 
321 /* -------------
322  ... free data
323  ------------- */
324 
325  if ( AMA_MltvDataFree ( options, nind, &x, &z, &epsilon, &wht, &lamda ) )
326  {
327  fprintf ( stderr, " exampleAMA_MltvGrd: Error freeing data.\n" );
328  exit(1);
329  }
330 
331  if ( AMA_OptionsFree ( &options ) )
332  {
333  fprintf ( stderr, " exampleAMA_MltvGrd: Error freeing AMA_OPTIONS.\n" );
334  exit(1);
335  }
336 
337  exit(0);
338 }
long int AMA_OptionsSetOutputFlag(AMA_OPTIONS *options, long int outputFlag)
long int exampleAMA_MltvGrdWrite(AMA_OPTIONS *options, const char *approx, const char *datname, AMA_SPLINE *spline)
Write spline approximation to ascii file.
Definition: exampleAMA_MltvGrd.c:507
long int ier
long int AMA_MltvGrdLstsqr(AMA_OPTIONS *options, long int nind, long int *ng, double **x, double *z, double *wht, long int *degree, long int *mlamda, double **lamda, double theta, AMA_SPLINE **spline)
long int AMA_MltvGrdApprox(AMA_OPTIONS *options, long int nind, long int *ng, double **x, double *z, double *wht, long int *degree, AMA_SPLINE **spline)
long int AMA_MltvGrdMonoInterp(AMA_OPTIONS *options, long int nind, long int *ng, double **x, double *z, long int *degree, AMA_SPLINE **spline)
long int AMA_MltvGrdMonoApprox(AMA_OPTIONS *options, long int nind, long int *ng, double **x, double *z, double *epsilon, long int *degree, AMA_SPLINE **spline)
long int exampleAMA_MltvGrdError(AMA_OPTIONS *options, long int nind, long int *ng, double **x, double *z, AMA_SPLINE *spline)
Produce absolute error table for AMA Spline Library Multivariate Gridded Data Functions.
Definition: exampleAMA_MltvGrd.c:424
CNSPLA_SPLINE AMA_SPLINE
long int exampleAMA_MltvGrdArguments(int argc, char **argv, long int *appindx, char *approx, char *datfile)
Parse main() programs parameters.
Definition: exampleAMA_MltvGrd.c:353
long int AMA_MltvGrdInterp(AMA_OPTIONS *options, long int nind, long int *ng, double **x, double *z, long int *degree, AMA_SPLINE **spline)
#define AMA_MXNIND