summaryrefslogtreecommitdiff
path: root/libFOSSEE_Scilab_intqpipopt.c
diff options
context:
space:
mode:
authorHarpreet2016-08-04 15:25:44 +0530
committerHarpreet2016-08-04 15:25:44 +0530
commit9fd2976931c088dc523974afb901e96bad20f73c (patch)
tree22502de6e6988d5cd595290d11266f8432ad825b /libFOSSEE_Scilab_intqpipopt.c
downloadFOSSEE-Optim-toolbox-development-9fd2976931c088dc523974afb901e96bad20f73c.tar.gz
FOSSEE-Optim-toolbox-development-9fd2976931c088dc523974afb901e96bad20f73c.tar.bz2
FOSSEE-Optim-toolbox-development-9fd2976931c088dc523974afb901e96bad20f73c.zip
initial add
Diffstat (limited to 'libFOSSEE_Scilab_intqpipopt.c')
-rw-r--r--libFOSSEE_Scilab_intqpipopt.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/libFOSSEE_Scilab_intqpipopt.c b/libFOSSEE_Scilab_intqpipopt.c
new file mode 100644
index 0000000..3bfc236
--- /dev/null
+++ b/libFOSSEE_Scilab_intqpipopt.c
@@ -0,0 +1,34 @@
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include <mex.h>
+#include <sci_gateway.h>
+#include <api_scilab.h>
+#include <MALLOC.h>
+static int direct_gateway(char *fname,void F(void)) { F();return 0;};
+extern Gatefunc cpp_intfminunc;
+extern Gatefunc cpp_intfminbnd;
+extern Gatefunc cpp_intfmincon;
+static GenericTable Tab[]={
+ {(Myinterfun)sci_gateway,cpp_intfminunc,"inter_fminunc"},
+ {(Myinterfun)sci_gateway,cpp_intfminbnd,"inter_fminbnd"},
+ {(Myinterfun)sci_gateway,cpp_intfmincon,"inter_fmincon"},
+};
+
+int C2F(libFOSSEE_Scilab_intqpipopt)()
+{
+ 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