7
|
1 // f-fsqp.cc -*- C++ -*- |
1
|
2 /* |
|
3 |
1009
|
4 Copyright (C) 1993, 1994, 1995 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 |
1192
|
25 #include <config.h> |
1
|
26 #endif |
|
27 |
|
28 #include "FSQP.h" |
|
29 |
|
30 #include "tree-const.h" |
|
31 #include "error.h" |
544
|
32 #include "help.h" |
519
|
33 #include "defun-dld.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 |
162
|
42 fsqp_objective_function (const ColumnVector& x) |
1
|
43 { |
|
44 return 0.0; |
|
45 } |
|
46 |
|
47 ColumnVector |
162
|
48 fsqp_constraint_function (const ColumnVector& x) |
1
|
49 { |
|
50 ColumnVector retval; |
|
51 return retval; |
|
52 } |
|
53 |
646
|
54 #endif |
|
55 |
519
|
56 #if defined (FSQP_MISSING) |
701
|
57 DEFUN_DLD_BUILTIN ("fsqp", Ffsqp, Sfsqp, 11, 3, |
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 |
701
|
62 DEFUN_DLD_BUILTIN ("fsqp", Ffsqp, Sfsqp, 11, 3, |
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) |
701
|
92 DEFUN_DLD_BUILTIN ("fsqp_options", Ffsqp_options, Sfsqp_options, -1, 1, |
519
|
93 "This function requires FSQP, which is not freely\n\ |
|
94 redistributable. For more information, read the file\n\ |
|
95 libcruft/fsqp/README.MISSING in the source distribution.") |
|
96 #else |
701
|
97 DEFUN_DLD_BUILTIN ("fsqp_options", Ffsqp_options, Sfsqp_options, -1, 1, |
519
|
98 "fsqp_options (KEYWORD, VALUE)\n\ |
|
99 \n\ |
|
100 Set or show options for fsqp. Keywords may be abbreviated\n\ |
|
101 to the shortest match.") |
|
102 #endif |
272
|
103 { |
519
|
104 Octave_object retval; |
272
|
105 |
|
106 error ("fsqp_options: not implemented yet"); |
519
|
107 |
272
|
108 return retval; |
|
109 } |
|
110 |
1
|
111 /* |
|
112 ;;; Local Variables: *** |
|
113 ;;; mode: C++ *** |
|
114 ;;; page-delimiter: "^/\\*" *** |
|
115 ;;; End: *** |
|
116 */ |