lp_skeleton.h

Go to the documentation of this file.
00001 /* -*- C++ -*-
00002  *
00003  * This file is a part of LEMON, a generic C++ optimization library
00004  *
00005  * Copyright (C) 2003-2006
00006  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
00007  * (Egervary Research Group on Combinatorial Optimization, EGRES).
00008  *
00009  * Permission to use, modify and distribute this software is granted
00010  * provided that this copyright notice appears in all copies. For
00011  * precise terms see the accompanying LICENSE file.
00012  *
00013  * This software is provided "AS IS" with no warranty of any kind,
00014  * express or implied, and with no claim as to its suitability for any
00015  * purpose.
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 //     /// The lower bound of a linear expression (row) have to be given by an 
00083 //     /// extended number of type Value, i.e. a finite number of type 
00084 //     /// Value or -\ref INF.
00085 //     virtual void _setRowLowerBound(int i, Value value);
00086 //     /// \e
00087 
00088 //     /// The upper bound of a linear expression (row) have to be given by an 
00089 //     /// extended number of type Value, i.e. a finite number of type 
00090 //     /// Value or \ref INF.
00091 //     virtual void _setRowUpperBound(int i, Value value);
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 } //namespace lemon
00158 
00159 #endif // LEMON_LP_SKELETON

Generated on Fri Feb 3 18:38:42 2006 for LEMON by  doxygen 1.4.6