Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

lp_skeleton.h

Go to the documentation of this file.
00001 /* -*- C++ -*-
00002  * lemon/lp_skeleton.h - Part of LEMON, a generic C++ optimization library
00003  *
00004  * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
00005  * (Egervary Research Group on Combinatorial Optimization, EGRES).
00006  *
00007  * Permission to use, modify and distribute this software is granted
00008  * provided that this copyright notice appears in all copies. For
00009  * precise terms see the accompanying LICENSE file.
00010  *
00011  * This software is provided "AS IS" with no warranty of any kind,
00012  * express or implied, and with no claim as to its suitability for any
00013  * purpose.
00014  *
00015  */
00016 
00017 #ifndef LEMON_LP_SKELETON
00018 #define LEMON_LP_SKELETON
00019 
00020 #include <lemon/lp_base.h>
00021 
00024 namespace lemon {
00025 
00027   class LpSkeleton :public LpSolverBase {
00028     int col_num,row_num;
00029     
00030   protected:
00032     virtual LpSolverBase &_newLp();
00034     virtual LpSolverBase &_copyLp();
00036     virtual int _addCol();
00038     virtual int _addRow();
00040     virtual void _eraseCol(int i);
00042     virtual void _eraseRow(int i);
00044 
00047     virtual void _setRowCoeffs(int i, 
00048                                int length,
00049                                int  const * indices, 
00050                                Value  const * values );
00052 
00055     virtual void _setColCoeffs(int i, 
00056                                int length,
00057                                int  const * indices, 
00058                                Value  const * values );
00059     
00061     virtual void _setCoeff(int row, int col, Value value);
00062 
00066     virtual void _setColLowerBound(int i, Value value);
00068 
00072     virtual void _setColUpperBound(int i, Value value);
00074 
00075 //     /// The lower bound of a linear expression (row) have to be given by an 
00076 //     /// extended number of type Value, i.e. a finite number of type 
00077 //     /// Value or -\ref INF.
00078 //     virtual void _setRowLowerBound(int i, Value value);
00079 //     /// \e
00080 
00081 //     /// The upper bound of a linear expression (row) have to be given by an 
00082 //     /// extended number of type Value, i.e. a finite number of type 
00083 //     /// Value or \ref INF.
00084 //     virtual void _setRowUpperBound(int i, Value value);
00085 
00090     virtual void _setRowBounds(int i, Value lb, Value ub);
00092 
00093 
00095     virtual void _clearObj();
00097     virtual void _setObjCoeff(int i, Value obj_coef);
00098 
00100     
00103     virtual SolveExitStatus _solve();
00104 
00106 
00109     virtual Value _getPrimal(int i);
00111 
00114     virtual Value _getPrimalValue();
00116 
00119     virtual SolutionStatus _getPrimalStatus();
00120 
00122     virtual SolutionStatus _getDualStatus();
00123 
00124 
00126     virtual ProblemTypes _getProblemType();
00127 
00129     virtual void _setMax();
00131     virtual void _setMin();
00132     
00133 
00134   public:
00135     LpSkeleton() : LpSolverBase(), col_num(0), row_num(0) {}
00136   };  
00137 
00138 } //namespace lemon
00139 
00140 #endif // LEMON_LP_SKELETON

Generated on Sat Aug 27 14:14:53 2005 for LEMON by  doxygen 1.4.4