annotate liboctave/NLP.h @ 4720:e759d01692db ss-2-1-53

[project @ 2004-01-23 04:13:37 by jwe]
author jwe
date Fri, 23 Jan 2004 04:13:37 +0000
parents 8b262e771614
children 4c8a2e4e0717
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
1 /*
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
2
2847
8b262e771614 [project @ 1997-03-27 16:18:26 by jwe]
jwe
parents: 1993
diff changeset
3 Copyright (C) 1996, 1997 John W. Eaton
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
4
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
6
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
10 later version.
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
11
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
15 for more details.
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
16
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
18 along with Octave; see the file COPYING. If not, write to the Free
1315
611d403c7f3d [project @ 1995-06-25 19:56:32 by jwe]
jwe
parents: 1296
diff changeset
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
20
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
21 */
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
22
382
e02d6b664394 [project @ 1994-03-09 21:08:03 by jwe]
jwe
parents: 296
diff changeset
23 #if !defined (octave_NLP_h)
e02d6b664394 [project @ 1994-03-09 21:08:03 by jwe]
jwe
parents: 296
diff changeset
24 #define octave_NLP_h 1
e02d6b664394 [project @ 1994-03-09 21:08:03 by jwe]
jwe
parents: 296
diff changeset
25
465
4caf8fbeb778 [project @ 1994-06-06 01:05:09 by jwe]
jwe
parents: 384
diff changeset
26 #include "dColVector.h"
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
27 #include "Objective.h"
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
28 #include "Bounds.h"
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
29 #include "LinConst.h"
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
30 #include "NLConst.h"
1528
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
31 #include "base-min.h"
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
32
1863
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
33 class
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
34 NLP : public base_minimizer
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
35 {
1863
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
36 public:
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
37
1863
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
38 NLP (void)
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
39 : base_minimizer (), phi (), bnds (), lc (), nlc () { }
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
40
1528
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
41 NLP (const ColumnVector& x, const Objective& obj)
1863
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
42 : base_minimizer (x), phi (obj), bnds (), lc (), nlc () { }
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
43
1528
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
44 NLP (const ColumnVector& x, const Objective& obj, const Bounds& b)
1863
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
45 : base_minimizer (x), phi (obj), bnds (b), lc (), nlc () { }
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
46
1528
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
47 NLP (const ColumnVector& x, const Objective& obj, const Bounds& b,
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
48 const LinConst& l)
1863
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
49 : base_minimizer (x), phi (obj), bnds (b), lc (l), nlc () { }
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
50
1528
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
51 NLP (const ColumnVector& x, const Objective& obj, const Bounds& b,
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
52 const LinConst& l, const NLConst& nl)
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
53 : base_minimizer (x), phi (obj), bnds (b), lc (l), nlc (nl) { }
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
54
1528
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
55 NLP (const ColumnVector& x, const Objective& obj, const LinConst& l)
1863
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
56 : base_minimizer (x), phi (obj), bnds (), lc (l), nlc () { }
1528
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
57
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
58 NLP (const ColumnVector& x, const Objective& obj, const LinConst& l,
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
59 const NLConst& nl)
1863
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
60 : base_minimizer (x), phi (obj), bnds (), lc (l), nlc (nl) { }
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
61
1528
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
62 NLP (const ColumnVector& x, const Objective& obj, const NLConst& nl)
1863
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
63 : base_minimizer (x), phi (obj), bnds (), lc (), nlc (nl) { }
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
64
1528
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
65 NLP (const ColumnVector& x, const Objective& obj, const Bounds& b,
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
66 const NLConst& nl)
1863
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
67 : base_minimizer (x), phi (obj), bnds (b), lc (), nlc (nl) { }
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
68
1835
12a94a17509d [project @ 1996-02-03 07:16:15 by jwe]
jwe
parents: 1528
diff changeset
69 NLP (const NLP& a)
12a94a17509d [project @ 1996-02-03 07:16:15 by jwe]
jwe
parents: 1528
diff changeset
70 : base_minimizer (a), phi (a.phi), bnds (a.bnds), lc (a.lc), nlc (a.nlc)
12a94a17509d [project @ 1996-02-03 07:16:15 by jwe]
jwe
parents: 1528
diff changeset
71 { }
12a94a17509d [project @ 1996-02-03 07:16:15 by jwe]
jwe
parents: 1528
diff changeset
72
1528
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
73 NLP& operator = (const NLP& a)
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
74 {
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
75 if (this != &a)
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
76 {
1835
12a94a17509d [project @ 1996-02-03 07:16:15 by jwe]
jwe
parents: 1528
diff changeset
77 base_minimizer::operator = (a);
12a94a17509d [project @ 1996-02-03 07:16:15 by jwe]
jwe
parents: 1528
diff changeset
78
1528
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
79 phi = a.phi;
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
80 bnds = a.bnds;
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
81 lc = a.lc;
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
82 nlc = a.nlc;
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
83 }
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
84 return *this;
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
85 }
287
6027a905fc06 [project @ 1994-01-13 01:41:00 by jwe]
jwe
parents: 238
diff changeset
86
1528
dc527156c38c [project @ 1995-10-05 01:44:18 by jwe]
jwe
parents: 1315
diff changeset
87 virtual ~NLP (void) { }
287
6027a905fc06 [project @ 1994-01-13 01:41:00 by jwe]
jwe
parents: 238
diff changeset
88
1863
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
89 Objective objective (void) const { return phi; }
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
90
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
91 Bounds bounds (void) const { return bnds; }
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
92
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
93 LinConst linear_constraints (void) const { return lc; }
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
94
1863
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
95 NLConst nonlinear_constraints (void) const { return nlc; }
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
96
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
97 protected:
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
98
986e565efd0a [project @ 1996-02-04 10:40:02 by jwe]
jwe
parents: 1835
diff changeset
99 Objective phi;
3
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
100 Bounds bnds;
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
101 LinConst lc;
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
102 NLConst nlc;
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
103 };
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
104
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
105 #endif
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
106
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
107 /*
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
108 ;;; Local Variables: ***
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
109 ;;; mode: C++ ***
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
110 ;;; End: ***
9a4c07481e61 [project @ 1993-08-08 01:20:23 by jwe]
jwe
parents:
diff changeset
111 */