7
|
1 // f-fsqp.cc -*- C++ -*- |
1
|
2 /* |
|
3 |
1884
|
4 Copyright (C) 1996 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 |
1315
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
21 |
|
22 */ |
|
23 |
240
|
24 #ifdef HAVE_CONFIG_H |
1192
|
25 #include <config.h> |
1
|
26 #endif |
|
27 |
|
28 #include "FSQP.h" |
|
29 |
1352
|
30 #include "defun-dld.h" |
1
|
31 #include "error.h" |
544
|
32 #include "help.h" |
1740
|
33 #include "oct-obj.h" |
1
|
34 |
646
|
35 #ifndef FSQP_MISSING |
|
36 |
1
|
37 // Global pointers for user defined functions required by fsqp. |
453
|
38 // static tree *fsqp_objective; |
|
39 // static tree *fsqp_constraints; |
1
|
40 |
|
41 double |
1538
|
42 fsqp_objective_function (const ColumnVector&) |
1
|
43 { |
|
44 return 0.0; |
|
45 } |
|
46 |
|
47 ColumnVector |
1538
|
48 fsqp_constraint_function (const ColumnVector&) |
1
|
49 { |
|
50 ColumnVector retval; |
|
51 return retval; |
|
52 } |
|
53 |
646
|
54 #endif |
|
55 |
519
|
56 #if defined (FSQP_MISSING) |
1684
|
57 DEFUN_DLD_BUILTIN ("fsqp", Ffsqp, Sfsqp, FSfsqp, 00, |
519
|
58 "This function requires FSQP, which is not freely\n\ |
|
59 redistributable. For more information, read the file\n\ |
|
60 libcruft/fsqp/README.MISSING in the source distribution.") |
|
61 #else |
1684
|
62 DEFUN_DLD_BUILTIN ("fsqp", Ffsqp, Sfsqp, FSfsqp, 00, |
519
|
63 "[X, PHI] = fsqp (X, PHI [, LB, UB] [, LB, A, UB] [, LB, G, UB])\n\ |
|
64 \n\ |
|
65 Groups of arguments surrounded in `[]' are optional, but\n\ |
|
66 must appear in the same relative order shown above.") |
|
67 #endif |
1
|
68 { |
|
69 /* |
|
70 |
|
71 Handle all of the following: |
|
72 |
|
73 1. fsqp (x, phi) |
|
74 2. fsqp (x, phi, lb, ub) |
|
75 3. fsqp (x, phi, lb, ub, llb, c, lub) |
|
76 4. fsqp (x, phi, lb, ub, llb, c, lub, nllb, g, nlub) |
|
77 5. fsqp (x, phi, lb, ub, nllb, g, nlub) |
|
78 6. fsqp (x, phi, llb, c, lub, nllb, g, nlub) |
|
79 7. fsqp (x, phi, llb, c, lub) |
|
80 8. fsqp (x, phi, nllb, g, nlub) |
|
81 |
|
82 */ |
|
83 |
519
|
84 Octave_object retval; |
1
|
85 |
216
|
86 error ("fsqp: not implemented yet"); |
519
|
87 |
1
|
88 return retval; |
|
89 } |
|
90 |
519
|
91 #if defined (FSQP_MISSING) |
1684
|
92 DEFUN_DLD_BUILTIN ("fsqp_options", Ffsqp_options, Sfsqp_options, |
|
93 FSfsqp_options, 00, |
519
|
94 "This function requires FSQP, which is not freely\n\ |
|
95 redistributable. For more information, read the file\n\ |
|
96 libcruft/fsqp/README.MISSING in the source distribution.") |
|
97 #else |
1684
|
98 DEFUN_DLD_BUILTIN ("fsqp_options", Ffsqp_options, Sfsqp_options, |
|
99 FSfsqp_options, 00, |
519
|
100 "fsqp_options (KEYWORD, VALUE)\n\ |
|
101 \n\ |
|
102 Set or show options for fsqp. Keywords may be abbreviated\n\ |
|
103 to the shortest match.") |
|
104 #endif |
272
|
105 { |
519
|
106 Octave_object retval; |
272
|
107 |
|
108 error ("fsqp_options: not implemented yet"); |
519
|
109 |
272
|
110 return retval; |
|
111 } |
|
112 |
1
|
113 /* |
|
114 ;;; Local Variables: *** |
|
115 ;;; mode: C++ *** |
|
116 ;;; page-delimiter: "^/\\*" *** |
|
117 ;;; End: *** |
|
118 */ |