From 4b64cf486f5c999fd8167758cae27839f3b50848 Mon Sep 17 00:00:00 2001 From: Harpreet Date: Sat, 3 Sep 2016 00:34:27 +0530 Subject: Structure updated and intqpipopt files added --- .../cpp/libFOSSEE_Optimization_Toolbox.c | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 newstructure/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.c (limited to 'newstructure/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.c') diff --git a/newstructure/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.c b/newstructure/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.c new file mode 100644 index 0000000..7090628 --- /dev/null +++ b/newstructure/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.c @@ -0,0 +1,40 @@ +#ifdef __cplusplus +extern "C" { +#endif +#include +#include +#include +#include +static int direct_gateway(char *fname,void F(void)) { F();return 0;}; +extern Gatefunc cpp_intfminunc; +extern Gatefunc cpp_intfminbnd; +extern Gatefunc cpp_intfmincon; +extern Gatefunc cpp_intqpipopt; +extern Gatefunc matrix_cppintlinprog; +extern Gatefunc mps_cppintlinprog; +static GenericTable Tab[]={ + {(Myinterfun)sci_gateway,cpp_intfminunc,"inter_fminunc"}, + {(Myinterfun)sci_gateway,cpp_intfminbnd,"inter_fminbnd"}, + {(Myinterfun)sci_gateway,cpp_intfmincon,"inter_fmincon"}, + {(Myinterfun)sci_gateway,cpp_intqpipopt,"sci_intqpipopt"}, + {(Myinterfun)sci_gateway,matrix_cppintlinprog,"sci_matrix_intlinprog"}, + {(Myinterfun)sci_gateway,mps_cppintlinprog,"sci_mps_intlinprog"}, +}; + +int C2F(libFOSSEE_Optimization_Toolbox)() +{ + Rhs = Max(0, Rhs); + if (*(Tab[Fin-1].f) != NULL) + { + if(pvApiCtx == NULL) + { + pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx)); + } + pvApiCtx->pstName = (char*)Tab[Fin-1].name; + (*(Tab[Fin-1].f))(Tab[Fin-1].name,Tab[Fin-1].F); + } + return 0; +} +#ifdef __cplusplus +} +#endif -- cgit