7
|
1 // f-fsqp.cc -*- C++ -*- |
1
|
2 /* |
|
3 |
453
|
4 Copyright (C) 1993, 1994 John W. Eaton |
1
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
240
|
24 #ifdef HAVE_CONFIG_H |
|
25 #include "config.h" |
1
|
26 #endif |
|
27 |
|
28 #ifndef FSQP_MISSING |
|
29 |
|
30 #include "FSQP.h" |
|
31 |
|
32 #include "tree-const.h" |
|
33 #include "error.h" |
7
|
34 #include "f-fsqp.h" |
1
|
35 |
|
36 // Global pointers for user defined functions required by fsqp. |
453
|
37 // static tree *fsqp_objective; |
|
38 // static tree *fsqp_constraints; |
1
|
39 |
|
40 #ifdef WITH_DLD |
|
41 tree_constant * |
162
|
42 builtin_fsqp_2 (const tree_constant *args, int nargin, int nargout) |
1
|
43 { |
|
44 return fsqp (args, nargin, nargout); |
|
45 } |
272
|
46 |
|
47 tree_constant * |
|
48 builtin_fsqp_options_2 (const tree_constant *args, int nargin, int nargout) |
|
49 { |
|
50 return fsqp_options (args, nargin, nargout); |
|
51 } |
1
|
52 #endif |
|
53 |
|
54 double |
162
|
55 fsqp_objective_function (const ColumnVector& x) |
1
|
56 { |
|
57 return 0.0; |
|
58 } |
|
59 |
|
60 ColumnVector |
162
|
61 fsqp_constraint_function (const ColumnVector& x) |
1
|
62 { |
|
63 ColumnVector retval; |
|
64 return retval; |
|
65 } |
|
66 |
|
67 tree_constant * |
162
|
68 fsqp (const tree_constant *args, int nargin, int nargout) |
1
|
69 { |
|
70 /* |
|
71 |
|
72 Handle all of the following: |
|
73 |
|
74 1. fsqp (x, phi) |
|
75 2. fsqp (x, phi, lb, ub) |
|
76 3. fsqp (x, phi, lb, ub, llb, c, lub) |
|
77 4. fsqp (x, phi, lb, ub, llb, c, lub, nllb, g, nlub) |
|
78 5. fsqp (x, phi, lb, ub, nllb, g, nlub) |
|
79 6. fsqp (x, phi, llb, c, lub, nllb, g, nlub) |
|
80 7. fsqp (x, phi, llb, c, lub) |
|
81 8. fsqp (x, phi, nllb, g, nlub) |
|
82 |
|
83 */ |
|
84 |
|
85 // Assumes that we have been given the correct number of arguments. |
|
86 |
|
87 tree_constant *retval = NULL_TREE_CONST; |
216
|
88 error ("fsqp: not implemented yet"); |
1
|
89 return retval; |
|
90 } |
|
91 |
272
|
92 tree_constant * |
|
93 fsqp_options (const tree_constant *args, int nargin, int nargout) |
|
94 { |
|
95 // Assumes that we have been given the correct number of arguments. |
|
96 |
|
97 tree_constant *retval = NULL_TREE_CONST; |
|
98 error ("fsqp_options: not implemented yet"); |
|
99 return retval; |
|
100 } |
|
101 |
1
|
102 #endif |
|
103 |
|
104 /* |
|
105 ;;; Local Variables: *** |
|
106 ;;; mode: C++ *** |
|
107 ;;; page-delimiter: "^/\\*" *** |
|
108 ;;; End: *** |
|
109 */ |