1 /* -*- mode: C++; indent-tabs-mode: nil; -*- 2 * 3 * This file is a part of LEMON, a generic C++ optimization library. 4 * 5 * Copyright (C) 2003-2013 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). 8 * 9 * Permission to use, modify and distribute this software is granted 10 * provided that this copyright notice appears in all copies. For 11 * precise terms see the accompanying LICENSE file. 12 * 13 * This software is provided "AS IS" with no warranty of any kind, 14 * express or implied, and with no claim as to its suitability for any 15 * purpose. 16 * 17 */ 18 19 #include <lemon/lp_skeleton.h> 20 21 ///\file 22 ///\brief A skeleton file to implement LP solver interfaces 23 namespace lemon { 24 _addCol()25 int SkeletonSolverBase::_addCol() 26 { 27 return ++col_num; 28 } 29 _addRow()30 int SkeletonSolverBase::_addRow() 31 { 32 return ++row_num; 33 } 34 _addRow(Value,ExprIterator,ExprIterator,Value)35 int SkeletonSolverBase::_addRow(Value, ExprIterator, ExprIterator, Value) 36 { 37 return ++row_num; 38 } 39 _eraseCol(int)40 void SkeletonSolverBase::_eraseCol(int) {} _eraseRow(int)41 void SkeletonSolverBase::_eraseRow(int) {} 42 _getColName(int,std::string &) const43 void SkeletonSolverBase::_getColName(int, std::string &) const {} _setColName(int,const std::string &)44 void SkeletonSolverBase::_setColName(int, const std::string &) {} _colByName(const std::string &) const45 int SkeletonSolverBase::_colByName(const std::string&) const { return -1; } 46 _getRowName(int,std::string &) const47 void SkeletonSolverBase::_getRowName(int, std::string &) const {} _setRowName(int,const std::string &)48 void SkeletonSolverBase::_setRowName(int, const std::string &) {} _rowByName(const std::string &) const49 int SkeletonSolverBase::_rowByName(const std::string&) const { return -1; } 50 _setRowCoeffs(int,ExprIterator,ExprIterator)51 void SkeletonSolverBase::_setRowCoeffs(int, ExprIterator, ExprIterator) {} _getRowCoeffs(int,InsertIterator) const52 void SkeletonSolverBase::_getRowCoeffs(int, InsertIterator) const {} 53 _setColCoeffs(int,ExprIterator,ExprIterator)54 void SkeletonSolverBase::_setColCoeffs(int, ExprIterator, ExprIterator) {} _getColCoeffs(int,InsertIterator) const55 void SkeletonSolverBase::_getColCoeffs(int, InsertIterator) const {} 56 _setCoeff(int,int,Value)57 void SkeletonSolverBase::_setCoeff(int, int, Value) {} _getCoeff(int,int) const58 SkeletonSolverBase::Value SkeletonSolverBase::_getCoeff(int, int) const 59 { return 0; } 60 _setColLowerBound(int,Value)61 void SkeletonSolverBase::_setColLowerBound(int, Value) {} _getColLowerBound(int) const62 SkeletonSolverBase::Value SkeletonSolverBase::_getColLowerBound(int) const 63 { return 0; } 64 _setColUpperBound(int,Value)65 void SkeletonSolverBase::_setColUpperBound(int, Value) {} _getColUpperBound(int) const66 SkeletonSolverBase::Value SkeletonSolverBase::_getColUpperBound(int) const 67 { return 0; } 68 _setRowLowerBound(int,Value)69 void SkeletonSolverBase::_setRowLowerBound(int, Value) {} _getRowLowerBound(int) const70 SkeletonSolverBase::Value SkeletonSolverBase::_getRowLowerBound(int) const 71 { return 0; } 72 _setRowUpperBound(int,Value)73 void SkeletonSolverBase::_setRowUpperBound(int, Value) {} _getRowUpperBound(int) const74 SkeletonSolverBase::Value SkeletonSolverBase::_getRowUpperBound(int) const 75 { return 0; } 76 _setObjCoeffs(ExprIterator,ExprIterator)77 void SkeletonSolverBase::_setObjCoeffs(ExprIterator, ExprIterator) {} _getObjCoeffs(InsertIterator) const78 void SkeletonSolverBase::_getObjCoeffs(InsertIterator) const {}; 79 _setObjCoeff(int,Value)80 void SkeletonSolverBase::_setObjCoeff(int, Value) {} _getObjCoeff(int) const81 SkeletonSolverBase::Value SkeletonSolverBase::_getObjCoeff(int) const 82 { return 0; } 83 _setSense(Sense)84 void SkeletonSolverBase::_setSense(Sense) {} _getSense() const85 SkeletonSolverBase::Sense SkeletonSolverBase::_getSense() const 86 { return MIN; } 87 _clear()88 void SkeletonSolverBase::_clear() { 89 row_num = col_num = 0; 90 } 91 _messageLevel(MessageLevel)92 void SkeletonSolverBase::_messageLevel(MessageLevel) {} 93 _write(std::string,std::string) const94 void SkeletonSolverBase::_write(std::string, std::string) const {} 95 _solve()96 LpSkeleton::SolveExitStatus LpSkeleton::_solve() { return SOLVED; } 97 _getPrimal(int) const98 LpSkeleton::Value LpSkeleton::_getPrimal(int) const { return 0; } _getDual(int) const99 LpSkeleton::Value LpSkeleton::_getDual(int) const { return 0; } _getPrimalValue() const100 LpSkeleton::Value LpSkeleton::_getPrimalValue() const { return 0; } 101 _getPrimalRay(int) const102 LpSkeleton::Value LpSkeleton::_getPrimalRay(int) const { return 0; } _getDualRay(int) const103 LpSkeleton::Value LpSkeleton::_getDualRay(int) const { return 0; } 104 _getPrimalType() const105 LpSkeleton::ProblemType LpSkeleton::_getPrimalType() const 106 { return UNDEFINED; } 107 _getDualType() const108 LpSkeleton::ProblemType LpSkeleton::_getDualType() const 109 { return UNDEFINED; } 110 _getColStatus(int) const111 LpSkeleton::VarStatus LpSkeleton::_getColStatus(int) const 112 { return BASIC; } 113 _getRowStatus(int) const114 LpSkeleton::VarStatus LpSkeleton::_getRowStatus(int) const 115 { return BASIC; } 116 newSolver() const117 LpSkeleton* LpSkeleton::newSolver() const 118 { return static_cast<LpSkeleton*>(0); } 119 cloneSolver() const120 LpSkeleton* LpSkeleton::cloneSolver() const 121 { return static_cast<LpSkeleton*>(0); } 122 _solverName() const123 const char* LpSkeleton::_solverName() const { return "LpSkeleton"; } 124 _solve()125 MipSkeleton::SolveExitStatus MipSkeleton::_solve() 126 { return SOLVED; } 127 _getSol(int) const128 MipSkeleton::Value MipSkeleton::_getSol(int) const { return 0; } _getSolValue() const129 MipSkeleton::Value MipSkeleton::_getSolValue() const { return 0; } 130 _getType() const131 MipSkeleton::ProblemType MipSkeleton::_getType() const 132 { return UNDEFINED; } 133 newSolver() const134 MipSkeleton* MipSkeleton::newSolver() const 135 { return static_cast<MipSkeleton*>(0); } 136 cloneSolver() const137 MipSkeleton* MipSkeleton::cloneSolver() const 138 { return static_cast<MipSkeleton*>(0); } 139 _solverName() const140 const char* MipSkeleton::_solverName() const { return "MipSkeleton"; } 141 142 } //namespace lemon 143 144