diff liboctave/QPSOL.h @ 289:c23f50e61c58

[project @ 1994-01-13 06:25:58 by jwe]
author jwe
date Thu, 13 Jan 1994 06:26:54 +0000
parents 780cbbc57b7c
children 3c23b8ea9099
line wrap: on
line diff
--- a/liboctave/QPSOL.h
+++ b/liboctave/QPSOL.h
@@ -33,51 +33,81 @@
 #define Vector ColumnVector
 #endif
 
-class QPSOL : public QP
+class QPSOL_options
+{
+ public:
+
+  QPSOL_options (void);
+  QPSOL_options (const QPSOL_options& opt);
+
+  QPSOL_options& operator = (const QPSOL_options& opt);
+
+  ~QPSOL_options (void);
+
+  void init (void);
+  void copy (const QPSOL_options& opt);
+
+  void set_default_options (void);
+
+  void set_feasibility_tolerance (double);
+  void set_infinite_bound (double);
+  void set_iteration_limit (int);
+  void set_print_level (int);
+
+  double feasibility_tolerance (void);
+  double infinite_bound (void);
+  int iteration_limit (void);
+  int print_level (void);
+
+ private:
+
+  double x_feasibility_tolerance;
+  double x_infinite_bound;
+  int x_iteration_limit;
+  int x_print_level;
+};
+
+class QPSOL : public QP, public QPSOL_options
 {
  public:
 
   QPSOL (void) : QP ()
-    { set_default_options (); }
+    { }
 
   QPSOL (const Vector& x, const Matrix& H) : QP (x, H)
-    { set_default_options (); }
+    { }
 
   QPSOL (const Vector& x, const Matrix& H, const Vector& c) : QP (x, H, c)
-    { set_default_options (); }
+    { }
 
   QPSOL (const Vector& x, const Matrix& H, const Bounds& b) : QP (x, H, b)
-    { set_default_options (); }
+    { }
 
   QPSOL (const Vector& x, const Matrix& H, const LinConst& lc) : QP (x, H, lc)
-    { set_default_options (); }
+    { }
 
   QPSOL (const Vector& x, const Matrix& H, const Vector& c, const Bounds& b)
-    : QP (x, H, c, b) { set_default_options (); }
+    : QP (x, H, c, b) { }
 
   QPSOL (const Vector& x, const Matrix& H, const Vector& c, const LinConst& lc)
-    : QP (x, H, c, lc) { set_default_options (); }
+    : QP (x, H, c, lc) { }
 
   QPSOL (const Vector& x, const Matrix& H, const Bounds& b, const LinConst& lc)
-    : QP (x, H, b, lc) { set_default_options (); }
+    : QP (x, H, b, lc) { }
 
   QPSOL (const Vector& x, const Matrix& H, const Vector& c, const Bounds& b,
       const LinConst& lc)
-    : QP (x, H, c, b, lc) { set_default_options (); }
+    : QP (x, H, c, b, lc) { }
 
   QPSOL (const QPSOL& a);
 
   QPSOL& operator = (const QPSOL& a);
 
   Vector minimize (double& objf, int& inform, Vector& lambda);
-
-private:
-  void set_default_options (void);
-  int iprint;
 };
 
 inline QPSOL::QPSOL (const QPSOL& a) : QP (a.x, a.H, a.c, a.bnds, a.lc)
-  { set_default_options (); }
+  { }
 
 inline QPSOL&
 QPSOL::operator = (const QPSOL& a)
@@ -87,7 +117,6 @@
   c = a.c;
   bnds = a.bnds;
   lc = a.lc;
-  iprint = a.iprint;
   return *this;
 }