00001
00002
00003
00004
00005 #ifndef QPBOUNDDATA_H
00006 #define QPBOUNDDATA_H
00007
00008 #include "Data.h"
00009
00010 #include "DoubleMatrixHandle.h"
00011 #include "OoqpVectorHandle.h"
00012 #include "OoqpVector.h"
00013
00014
00015 class QpBound;
00016 class MpsReader;
00017
00024 class QpBoundData : public Data
00025 {
00026
00027 protected:
00028 QpBound * factory;
00029
00031 int nx;
00032
00034 int nlower;
00035
00037 int nupper;
00038
00040 SymMatrixHandle mQ;
00041
00043 double alpha;
00044
00046 OoqpVectorHandle c;
00047
00049 OoqpVectorHandle lower;
00050
00052 OoqpVectorHandle upper;
00053
00056 OoqpVectorHandle index_lower;
00057
00060 OoqpVectorHandle index_upper;
00061
00062 public:
00063
00064 QpBoundData( QpBound * f, SymMatrix * Q, int n_in );
00065
00070 QpBoundData( QpBound * f, double alpha,
00071 OoqpVector * g, SymMatrix * Q,
00072 OoqpVector * l, OoqpVector * index_lower_,
00073 OoqpVector * u, OoqpVector * index_upper_ );
00074 virtual ~QpBoundData();
00075
00076
00078 virtual double objectiveValue( Variables * vars );
00079
00083 virtual void putQIntoAt( SymMatrix& M, int row, int col );
00084
00088 virtual void putQIntoAt( GenMatrix& M, int row, int col );
00089
00092 virtual void Qmult( double beta, OoqpVector& y,
00093 double alpha, OoqpVector& x );
00094
00096 virtual int getN();
00097
00099 virtual int getNlower();
00100
00102 virtual int getNupper();
00103
00105 virtual void getg ( OoqpVector& c );
00106
00108 virtual void getl ( OoqpVector& l );
00109
00111 virtual void getu ( OoqpVector& u );
00112
00113 virtual double datanorm();
00114
00115 virtual void datainput() { };
00116
00118 virtual void datainput(MpsReader * reader, int& ierr );
00119
00121 virtual void datarandom();
00122
00124 virtual void print();
00125
00127 OoqpVector * getIndexLower() { return SpAsPointer(index_lower); };
00128
00130 OoqpVector * getIndexUpper() { return SpAsPointer(index_upper); };
00131
00132 };
00133
00134 #endif