00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef LEMON_LP_SKELETON
00020 #define LEMON_LP_SKELETON
00021
00022 #include <lemon/lp_base.h>
00023
00026 namespace lemon {
00027
00029 class LpSkeleton :public LpSolverBase {
00030 int col_num,row_num;
00031
00032 protected:
00034 virtual LpSolverBase &_newLp();
00036 virtual LpSolverBase &_copyLp();
00038 virtual int _addCol();
00040 virtual int _addRow();
00042 virtual void _eraseCol(int i);
00044 virtual void _eraseRow(int i);
00046 virtual void _getColName(int col, std::string & name);
00048 virtual void _setColName(int col, const std::string & name);
00049
00051
00054 virtual void _setRowCoeffs(int i,
00055 int length,
00056 int const * indices,
00057 Value const * values );
00059
00062 virtual void _setColCoeffs(int i,
00063 int length,
00064 int const * indices,
00065 Value const * values );
00066
00068 virtual void _setCoeff(int row, int col, Value value);
00069
00073 virtual void _setColLowerBound(int i, Value value);
00075
00079 virtual void _setColUpperBound(int i, Value value);
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00097 virtual void _setRowBounds(int i, Value lb, Value ub);
00099
00100
00102 virtual void _clearObj();
00104 virtual void _setObjCoeff(int i, Value obj_coef);
00105
00107
00110 virtual SolveExitStatus _solve();
00111
00113
00116 virtual Value _getPrimal(int i);
00117
00119
00122 virtual Value _getDual(int i);
00123
00125
00128 virtual Value _getPrimalValue();
00129
00131
00134 virtual SolutionStatus _getPrimalStatus();
00135
00137 virtual SolutionStatus _getDualStatus();
00138
00139
00141 virtual ProblemTypes _getProblemType();
00142
00144 virtual void _setMax();
00146 virtual void _setMin();
00147
00149 virtual bool _isBasicCol(int i);
00150
00151
00152
00153 public:
00154 LpSkeleton() : LpSolverBase(), col_num(0), row_num(0) {}
00155 };
00156
00157 }
00158
00159 #endif // LEMON_LP_SKELETON