interpolation.h File Reference

#include "machine.h"

Include dependency graph for interpolation.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  TableType
struct  realhypermat

Defines

#define GetRhsScalarString(num, n, t)   if (!get_rhs_scalar_string(num,n,t)) { return 0;}
#define GetRhsRealHMat(pos, H)   if (!get_rhs_real_hmat(pos,H)) { return 0;}

Typedefs

typedef realhypermat RealHyperMat

Enumerations

enum  {
  NOT_A_KNOT, NATURAL, CLAMPED, PERIODIC,
  FAST, FAST_PERIODIC, MONOTONE, BY_ZERO,
  C0, LINEAR, BY_NAN, UNDEFINED
}

Functions

int get_rhs_scalar_string (int num, int *length, int **tabchar)
int get_rhs_real_hmat (int num, RealHyperMat *H)


Define Documentation

#define GetRhsRealHMat ( pos,
 )     if (!get_rhs_real_hmat(pos,H)) { return 0;}

Definition at line 23 of file interpolation.h.

Referenced by intlinear_interpn(), and intsplin3d().

#define GetRhsScalarString ( num,
n,
t   )     if (!get_rhs_scalar_string(num,n,t)) { return 0;}

Definition at line 20 of file interpolation.h.

Referenced by intinterp1(), intinterp2d(), intinterp3d(), intsplin(), and intsplin2d().


Typedef Documentation

typedef struct realhypermat RealHyperMat


Enumeration Type Documentation

anonymous enum

Enumerator:
NOT_A_KNOT 
NATURAL 
CLAMPED 
PERIODIC 
FAST 
FAST_PERIODIC 
MONOTONE 
BY_ZERO 
C0 
LINEAR 
BY_NAN 
UNDEFINED 

Definition at line 6 of file interpolation.h.


Function Documentation

int get_rhs_real_hmat ( int  num,
RealHyperMat H 
)

Definition at line 47 of file interpolation.c.

References C2F, err, H, iadr, il1, istk, Lstk, lw, Max, Nbvars, Rhs, sadr, stk, and Top.

00048 {
00049   int il, il1, il2, il3,/* it, */lw;
00050 
00051   lw = num + Top - Rhs;
00052   il = iadr(*Lstk( lw )); 
00053   if ( *istk(il) < 0 )
00054     il = iadr(*istk(il+1));
00055           
00056   if ( *istk(il) != 17 )
00057     goto err;
00058   else if ( *istk(il+1) != 3 )  /* a hm mlist must have 3 fields */
00059     goto err;
00060 
00061   /*  get the pointers for the 3 fields */
00062   il1 = sadr(il+6);
00063   il2 = il1 + *istk(il+3) - 1;
00064   il3 = il1 + *istk(il+4) - 1;
00065   il1 = iadr(il1); il2 = iadr(il2); il3 = iadr(il3);
00066 
00067   /*  test if the first field is a matrix string with 3 components
00068    *  and that the first is "hm" (ie 17 22  in scilab char code)
00069    */
00070   if ( (*istk(il1) != 10)  |  ((*istk(il1+1))*(*istk(il1+2)) != 3)  )
00071     goto err;
00072   else if ( *istk(il1+5)-1 != 2 )  /* 1 str must have 2 chars */
00073     goto err;
00074   else if ( *istk(il1+8) != 17  || *istk(il1+9) != 22 )
00075     goto err;
00076 
00077   /*  get the 2d field */
00078   if ( (*istk(il2) != 8)  |  (*istk(il2+3) != 4) )
00079     goto err;
00080   H->dimsize = (*istk(il2+1))*(*istk(il2+2));
00081   H->dims = istk(il2+4);
00082 
00083   /*  get the 3d field */
00084   if ( !( *istk(il3) == 1 && *istk(il3+3)==0) )
00085     goto err;;
00086 
00087   H->size = (*istk(il3+1))*(*istk(il3+2));
00088   H->R = stk(sadr(il3+4));
00089 
00090   /* needed for Jpc stuff (putlhsvar) */
00091   Nbvars = Max(Nbvars,num);
00092   C2F(intersci).ntypes[num-1] = '$';
00093   C2F(intersci).iwhere[num-1] = *Lstk(lw);
00094   C2F(intersci).lad[num-1] = 0;  /* a voir ? */
00095   return 1;
00096 
00097  err:
00098   Scierror(999,"Argument %d is not a real hypermatrix\r\n", num);
00099   return 0;
00100 }

int get_rhs_scalar_string ( int  num,
int length,
int **  tabchar 
)

Definition at line 102 of file interpolation.c.

References C2F, iadr, istk, Lstk, lw, Max, Nbvars, Rhs, and Top.

00103 {
00104   int il, lw;
00105 
00106   lw = num + Top - Rhs;
00107   il = iadr(*Lstk( lw )); 
00108   if ( *istk(il) < 0 )
00109     il = iadr(*istk(il+1));
00110           
00111   if ( ! ( *istk(il) == 10  &&  (*istk(il+1))*(*istk(il+2)) == 1 ) ) 
00112     {
00113       /* we look for a scalar string */
00114       Scierror(999,"Argument %d is not a scalar string\r\n", num);
00115       return 0;
00116     }
00117   *length = *istk(il+5)-1;
00118   *tabchar = istk(il+6);
00119 
00120   Nbvars = Max(Nbvars,num);
00121   C2F(intersci).ntypes[num-1] = '$';
00122   C2F(intersci).iwhere[num-1] = *Lstk(lw);
00123   C2F(intersci).lad[num-1] = 0;
00124   return 1;
00125 }


Generated on Sun Mar 4 16:08:02 2007 for Scilab [trunk] by  doxygen 1.5.1