schurtable.c

Go to the documentation of this file.
00001 /*-----------------------------------------------------------------------------------*/
00002 /* INRIA */
00003 /*-----------------------------------------------------------------------------------*/
00004 #include <string.h>
00005 #include "FTables.h"
00006 #include "link.h"
00007 
00008 /***********************************
00009 * Search Table for fschur
00010 ***********************************/
00011 
00012 #if defined(__STDC__)
00013 #define ARGS_fschur integer*,double *,double*,double*,double*
00014 typedef integer * (*fschurf)(ARGS_fschur);
00015 #else
00016 #define ARGS_fschur 
00017 typedef integer * (*fschurf)();
00018 #endif 
00019 
00020 /***********************************
00021 * Search Table for schsel
00022 ***********************************/
00023 
00024 #if defined(__STDC__)
00025 #define ARGS_schsel double *,double*
00026 typedef integer * (*schself)(ARGS_schsel);
00027 #else
00028 #define ARGS_schsel 
00029 typedef integer * (*schself)();
00030 #endif 
00031 
00032 /***********************************
00033 * Search Table for zchsel
00034 ***********************************/
00035 
00036 #if defined(__STDC__)
00037 #define ARGS_zchsel doublecmplx *
00038 typedef integer *(*zchself)(ARGS_zchsel);
00039 #else
00040 #define ARGS_zchsel 
00041 typedef integer * (*zchself)();
00042 #endif 
00043 
00044 /***********************************
00045 * Search Table for gshsel
00046 ***********************************/
00047 
00048 #if defined(__STDC__)
00049 #define ARGS_gshsel double *,double*,double*
00050 typedef integer * (*gshself)(ARGS_gshsel);
00051 #else
00052 #define ARGS_gshsel 
00053 typedef integer * (*gshself)();
00054 #endif 
00055 
00056 /***********************************
00057 * Search Table for gzhsel
00058 ***********************************/
00059 
00060 #if defined(__STDC__)
00061 #define ARGS_gzhsel doublecmplx *,doublecmplx *
00062 typedef integer * (*gzhself)(ARGS_gzhsel);
00063 #else
00064 #define ARGS_gzhsel 
00065 typedef integer * (*gzhself)();
00066 #endif 
00067 
00068 /****************  ***************/
00069 static void Emptyfunc  __PARAMS((void)) {}
00070 
00071 /**************** fschur ***************/
00072 extern void C2F(folhp)(ARGS_fschur);
00073 extern void C2F(find)(ARGS_fschur);
00074 
00075 FTAB FTab_fschur[] =
00076 {
00077         {"find", (voidf)  C2F(find)},
00078         {"folhp", (voidf)  C2F(folhp)},
00079         {(char *) 0, (voidf) 0}
00080 };
00081 /**************** schsel ***************/
00082 extern void C2F(sb02mv)(ARGS_schsel);
00083 extern void C2F(sb02mw)(ARGS_schsel);
00084 
00085 FTAB FTab_schsel[] =
00086 {
00087         {"sb02mv", (voidf)  C2F(sb02mv)},
00088         {"sb02mw", (voidf)  C2F(sb02mw)},
00089         {(char *) 0, (voidf) 0}
00090 };
00091 /**************** zchsel ***************/
00092 extern void C2F(zb02mv)(ARGS_zchsel);
00093 extern void C2F(zb02mw)(ARGS_zchsel);
00094 
00095 FTAB FTab_zchsel[] =
00096 {
00097         {"zb02mv", (voidf)  C2F(zb02mv)},
00098         {"zb02mw", (voidf)  C2F(zb02mw)},
00099         {(char *) 0, (voidf) 0}
00100 };
00101 /**************** gshsel ***************/
00102 extern void C2F(sb02ow)(ARGS_gshsel);
00103 extern void C2F(sb02ox)(ARGS_gshsel);
00104 
00105 FTAB FTab_gshsel[] =
00106 {
00107         {"sb02ow", (voidf)  C2F(sb02ow)},
00108         {"sb02ox", (voidf)  C2F(sb02ox)},
00109         {(char *) 0, (voidf) 0}
00110 };
00111 /**************** gzhsel ***************/
00112 extern void C2F(zb02ow)(ARGS_gzhsel);
00113 extern void C2F(zb02ox)(ARGS_gzhsel);
00114 
00115 FTAB FTab_gzhsel[] =
00116 {
00117         {"zb02ow", (voidf)  C2F(zb02ow)},
00118         {"zb02ox", (voidf)  C2F(zb02ox)},
00119         {(char *) 0, (voidf) 0}
00120 };
00121 
00122 
00123 /***********************************
00124 * Search Table for schur uses : schsel
00125 ***********************************/
00126 
00129 static schself schselfonc ;
00130 
00133 integer *C2F(schsel)(double *alpha, double *beta)
00134 {
00135         return((*schselfonc)(alpha,beta));
00136 }
00137 
00140 void C2F(setschsel)(int *len, char *name, int *rep)
00141 {
00142         if ( ((strncmp(name,"c",1)== 0 ) && (*len==1)) || strncmp(name,"cont",4)== 0 )
00143                 schselfonc = (schself) SetFunction("sb02mv",rep,FTab_schsel);
00144         else if ( ((strncmp(name,"d",1)== 0) && (*len==1)) || strncmp(name,"disc",4)== 0 )
00145                 schselfonc = (schself) SetFunction("sb02mw",rep,FTab_schsel);
00146         else 
00147                 schselfonc = (schself) SetFunction(name,rep,FTab_schsel);
00148 }
00149 
00150 /***********************************
00151 * Search Table for schur uses : zchsel
00152 ***********************************/
00153 
00156 static zchself zchselfonc ;
00157 
00160 integer *C2F(zchsel)(doublecmplx *alpha)
00161 {
00162         return((*zchselfonc)(alpha));
00163 }
00164 
00167 void C2F(setzchsel)(int *len, char *name, int *rep)
00168 {
00169         if ( ((strncmp(name,"c",1)== 0) && (*len==1)) || strncmp(name,"cont",3)== 0 )
00170                 zchselfonc = (zchself) SetFunction("zb02mv",rep,FTab_zchsel);
00171         else if ( ( (strncmp(name,"d",1)== 0) && (*len==1) ) || strncmp(name,"disc",4)== 0 )
00172                 zchselfonc = (zchself) SetFunction("zb02mw",rep,FTab_zchsel);
00173         else 
00174                 zchselfonc = (zchself) SetFunction(name,rep,FTab_zchsel);
00175 }
00176 
00177 /***********************************
00178 * Search Table for gschur uses : gshsel
00179 ***********************************/
00180 
00183 static gshself gshselfonc ;
00184 
00187 integer *C2F(gshsel)(double *alphar, double *alphai, double *beta)
00188 {
00189         return((*gshselfonc)(alphar,alphai,beta));
00190 }
00191 
00194 void C2F(setgshsel)(int *len, char *name, int *rep)
00195 {
00196         if ( ((strncmp(name,"c",1)== 0) && (*len==1)) || strncmp(name,"cont",3)== 0 )
00197                 gshselfonc = (gshself) SetFunction("sb02ow",rep,FTab_gshsel);
00198         else if ( ( (strncmp(name,"d",1)== 0) && (*len==1) ) || strncmp(name,"disc",4)== 0 )
00199                 gshselfonc = (gshself) SetFunction("sb02ox",rep,FTab_gshsel);
00200         else 
00201                 gshselfonc = (gshself) SetFunction(name,rep,FTab_gshsel);
00202 }
00203 
00204 /***********************************
00205 * Search Table for gschur uses : gzhsel
00206 ***********************************/
00207 
00210 static gzhself gzhselfonc ;
00211 
00214 integer *C2F(gzhsel)(doublecmplx *alpha, doublecmplx *beta)
00215 {
00216         return((*gzhselfonc)(alpha,beta));
00217 }
00218 
00221 void C2F(setgzhsel)(int *len, char *name, int *rep)
00222 {
00223         if ( ((strncmp(name,"c",1)== 0) && (*len==1)) || strncmp(name,"cont",3)== 0 )
00224                 gzhselfonc = (gzhself) SetFunction("zb02ow",rep,FTab_gzhsel);
00225         else if ( ( (strncmp(name,"d",1)== 0) && (*len==1) ) || strncmp(name,"disc",4)== 0 )
00226                 gzhselfonc = (gzhself) SetFunction("zb02ox",rep,FTab_gzhsel);
00227         else 
00228                 gzhselfonc = (gzhself) SetFunction(name,rep,FTab_gzhsel);
00229 }
00230 
00231 /***********************************
00232 * Search Table for schur uses : fschur 
00233 ***********************************/
00234 
00237 static fschurf fschurfonc ;
00238 
00241 integer *C2F(fschur)(integer *lsize, double *alpha, double *beta, double *s, double *p)
00242 {
00243         return((*fschurfonc)(lsize,alpha,beta,s,p));
00244 }
00245 
00248 void C2F(setfschur)(char *name, int *rep)
00249 {
00250         if (strncmp(name,"c",1)== 0 || strncmp(name,"cont",3)== 0 )
00251                 fschurfonc = (fschurf) SetFunction("folhp",rep,FTab_fschur);
00252         else if (strncmp(name,"d",1)== 0 || strncmp(name,"disc",4)== 0 )
00253                 fschurfonc = (fschurf) SetFunction("find",rep,FTab_fschur);
00254         else 
00255                 fschurfonc = (fschurf) SetFunction(name,rep,FTab_fschur);
00256 }
00257 

Generated on Sun Mar 4 15:03:58 2007 for Scilab [trunk] by  doxygen 1.5.1