1.1 --- a/lemon/lp_skeleton.cc Tue Dec 02 21:40:33 2008 +0100
1.2 +++ b/lemon/lp_skeleton.cc Tue Dec 02 22:48:28 2008 +0100
1.3 @@ -22,166 +22,113 @@
1.4 ///\brief A skeleton file to implement LP solver interfaces
1.5 namespace lemon {
1.6
1.7 - LpSolverBase* LpSkeleton::_newLp()
1.8 - {
1.9 - LpSolverBase *tmp=0;
1.10 - return tmp;
1.11 - }
1.12 -
1.13 - LpSolverBase* LpSkeleton::_copyLp()
1.14 - {
1.15 - LpSolverBase *tmp=0;
1.16 - return tmp;
1.17 - }
1.18 -
1.19 - int LpSkeleton::_addCol()
1.20 + int SkeletonSolverBase::_addCol()
1.21 {
1.22 return ++col_num;
1.23 }
1.24
1.25 - int LpSkeleton::_addRow()
1.26 + int SkeletonSolverBase::_addRow()
1.27 {
1.28 return ++row_num;
1.29 }
1.30
1.31 - void LpSkeleton::_eraseCol(int ) {
1.32 + void SkeletonSolverBase::_eraseCol(int) {}
1.33 + void SkeletonSolverBase::_eraseRow(int) {}
1.34 +
1.35 + void SkeletonSolverBase::_getColName(int, std::string &) const {}
1.36 + void SkeletonSolverBase::_setColName(int, const std::string &) {}
1.37 + int SkeletonSolverBase::_colByName(const std::string&) const { return -1; }
1.38 +
1.39 + void SkeletonSolverBase::_getRowName(int, std::string &) const {}
1.40 + void SkeletonSolverBase::_setRowName(int, const std::string &) {}
1.41 + int SkeletonSolverBase::_rowByName(const std::string&) const { return -1; }
1.42 +
1.43 + void SkeletonSolverBase::_setRowCoeffs(int, ExprIterator, ExprIterator) {}
1.44 + void SkeletonSolverBase::_getRowCoeffs(int, InsertIterator) const {}
1.45 +
1.46 + void SkeletonSolverBase::_setColCoeffs(int, ExprIterator, ExprIterator) {}
1.47 + void SkeletonSolverBase::_getColCoeffs(int, InsertIterator) const {}
1.48 +
1.49 + void SkeletonSolverBase::_setCoeff(int, int, Value) {}
1.50 + SkeletonSolverBase::Value SkeletonSolverBase::_getCoeff(int, int) const
1.51 + { return 0; }
1.52 +
1.53 + void SkeletonSolverBase::_setColLowerBound(int, Value) {}
1.54 + SkeletonSolverBase::Value SkeletonSolverBase::_getColLowerBound(int) const
1.55 + { return 0; }
1.56 +
1.57 + void SkeletonSolverBase::_setColUpperBound(int, Value) {}
1.58 + SkeletonSolverBase::Value SkeletonSolverBase::_getColUpperBound(int) const
1.59 + { return 0; }
1.60 +
1.61 + void SkeletonSolverBase::_setRowLowerBound(int, Value) {}
1.62 + SkeletonSolverBase::Value SkeletonSolverBase::_getRowLowerBound(int) const
1.63 + { return 0; }
1.64 +
1.65 + void SkeletonSolverBase::_setRowUpperBound(int, Value) {}
1.66 + SkeletonSolverBase::Value SkeletonSolverBase::_getRowUpperBound(int) const
1.67 + { return 0; }
1.68 +
1.69 + void SkeletonSolverBase::_setObjCoeffs(ExprIterator, ExprIterator) {}
1.70 + void SkeletonSolverBase::_getObjCoeffs(InsertIterator) const {};
1.71 +
1.72 + void SkeletonSolverBase::_setObjCoeff(int, Value) {}
1.73 + SkeletonSolverBase::Value SkeletonSolverBase::_getObjCoeff(int) const
1.74 + { return 0; }
1.75 +
1.76 + void SkeletonSolverBase::_setSense(Sense) {}
1.77 + SkeletonSolverBase::Sense SkeletonSolverBase::_getSense() const
1.78 + { return MIN; }
1.79 +
1.80 + void SkeletonSolverBase::_clear() {
1.81 + row_num = col_num = 0;
1.82 }
1.83
1.84 - void LpSkeleton::_eraseRow(int) {
1.85 - }
1.86 + LpSkeleton::SolveExitStatus LpSkeleton::_solve() { return SOLVED; }
1.87
1.88 - void LpSkeleton::_getColName(int, std::string &) const {
1.89 - }
1.90 + LpSkeleton::Value LpSkeleton::_getPrimal(int) const { return 0; }
1.91 + LpSkeleton::Value LpSkeleton::_getDual(int) const { return 0; }
1.92 + LpSkeleton::Value LpSkeleton::_getPrimalValue() const { return 0; }
1.93
1.94 + LpSkeleton::Value LpSkeleton::_getPrimalRay(int) const { return 0; }
1.95 + LpSkeleton::Value LpSkeleton::_getDualRay(int) const { return 0; }
1.96
1.97 - void LpSkeleton::_setColName(int, const std::string &) {
1.98 - }
1.99 + LpSkeleton::ProblemType LpSkeleton::_getPrimalType() const
1.100 + { return UNDEFINED; }
1.101
1.102 - int LpSkeleton::_colByName(const std::string&) const { return -1; }
1.103 + LpSkeleton::ProblemType LpSkeleton::_getDualType() const
1.104 + { return UNDEFINED; }
1.105
1.106 + LpSkeleton::VarStatus LpSkeleton::_getColStatus(int) const
1.107 + { return BASIC; }
1.108
1.109 - void LpSkeleton::_setRowCoeffs(int, ConstRowIterator, ConstRowIterator) {
1.110 - }
1.111 + LpSkeleton::VarStatus LpSkeleton::_getRowStatus(int) const
1.112 + { return BASIC; }
1.113
1.114 - void LpSkeleton::_getRowCoeffs(int, RowIterator) const {
1.115 - }
1.116 + LpSkeleton* LpSkeleton::_newSolver() const
1.117 + { return static_cast<LpSkeleton*>(0); }
1.118
1.119 - void LpSkeleton::_setColCoeffs(int, ConstColIterator, ConstColIterator) {
1.120 - }
1.121 + LpSkeleton* LpSkeleton::_cloneSolver() const
1.122 + { return static_cast<LpSkeleton*>(0); }
1.123
1.124 - void LpSkeleton::_getColCoeffs(int, ColIterator) const {
1.125 - }
1.126 + const char* LpSkeleton::_solverName() const { return "LpSkeleton"; }
1.127
1.128 - void LpSkeleton::_setCoeff(int, int, Value )
1.129 - {
1.130 - }
1.131 + MipSkeleton::SolveExitStatus MipSkeleton::_solve()
1.132 + { return SOLVED; }
1.133
1.134 - LpSkeleton::Value LpSkeleton::_getCoeff(int, int) const
1.135 - {
1.136 - return 0;
1.137 - }
1.138 + MipSkeleton::Value MipSkeleton::_getSol(int) const { return 0; }
1.139 + MipSkeleton::Value MipSkeleton::_getSolValue() const { return 0; }
1.140
1.141 + MipSkeleton::ProblemType MipSkeleton::_getType() const
1.142 + { return UNDEFINED; }
1.143
1.144 - void LpSkeleton::_setColLowerBound(int, Value)
1.145 - {
1.146 - }
1.147 + MipSkeleton* MipSkeleton::_newSolver() const
1.148 + { return static_cast<MipSkeleton*>(0); }
1.149
1.150 - LpSkeleton::Value LpSkeleton::_getColLowerBound(int) const
1.151 - {
1.152 - return 0;
1.153 - }
1.154 + MipSkeleton* MipSkeleton::_cloneSolver() const
1.155 + { return static_cast<MipSkeleton*>(0); }
1.156
1.157 - void LpSkeleton::_setColUpperBound(int, Value)
1.158 - {
1.159 - }
1.160 -
1.161 - LpSkeleton::Value LpSkeleton::_getColUpperBound(int) const
1.162 - {
1.163 - return 0;
1.164 - }
1.165 -
1.166 -// void LpSkeleton::_setRowLowerBound(int, Value)
1.167 -// {
1.168 -// }
1.169 -
1.170 -// void LpSkeleton::_setRowUpperBound(int, Value)
1.171 -// {
1.172 -// }
1.173 -
1.174 - void LpSkeleton::_setRowBounds(int, Value, Value)
1.175 - {
1.176 - }
1.177 -
1.178 - void LpSkeleton::_getRowBounds(int, Value&, Value&) const
1.179 - {
1.180 - }
1.181 -
1.182 - void LpSkeleton::_setObjCoeff(int, Value)
1.183 - {
1.184 - }
1.185 -
1.186 - LpSkeleton::Value LpSkeleton::_getObjCoeff(int) const
1.187 - {
1.188 - return 0;
1.189 - }
1.190 -
1.191 - void LpSkeleton::_setMax()
1.192 - {
1.193 - }
1.194 -
1.195 - void LpSkeleton::_setMin()
1.196 - {
1.197 - }
1.198 -
1.199 - bool LpSkeleton::_isMax() const
1.200 - {
1.201 - return true;
1.202 - }
1.203 -
1.204 -
1.205 - void LpSkeleton::_clearObj()
1.206 - {
1.207 - }
1.208 -
1.209 - LpSkeleton::SolveExitStatus LpSkeleton::_solve()
1.210 - {
1.211 - return SOLVED;
1.212 - }
1.213 -
1.214 - LpSkeleton::Value LpSkeleton::_getPrimal(int) const
1.215 - {
1.216 - return 0;
1.217 - }
1.218 -
1.219 - LpSkeleton::Value LpSkeleton::_getDual(int) const
1.220 - {
1.221 - return 0;
1.222 - }
1.223 -
1.224 - LpSkeleton::Value LpSkeleton::_getPrimalValue() const
1.225 - {
1.226 - return 0;
1.227 - }
1.228 -
1.229 - LpSkeleton::SolutionStatus LpSkeleton::_getPrimalStatus() const
1.230 - {
1.231 - return UNDEFINED;
1.232 - }
1.233 -
1.234 - LpSkeleton::SolutionStatus LpSkeleton::_getDualStatus() const
1.235 - {
1.236 - return UNDEFINED;
1.237 - }
1.238 -
1.239 - LpSkeleton::ProblemTypes LpSkeleton::_getProblemType() const
1.240 - {
1.241 - return UNKNOWN;
1.242 - }
1.243 -
1.244 - bool LpSkeleton::_isBasicCol(int) const
1.245 - {
1.246 - return true;
1.247 - }
1.248 + const char* MipSkeleton::_solverName() const { return "MipSkeleton"; }
1.249
1.250 } //namespace lemon
1.251