[458] | 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-2008 |
---|
| 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 | |
---|
[459] | 25 | int SkeletonSolverBase::_addCol() |
---|
[458] | 26 | { |
---|
| 27 | return ++col_num; |
---|
| 28 | } |
---|
| 29 | |
---|
[459] | 30 | int SkeletonSolverBase::_addRow() |
---|
[458] | 31 | { |
---|
| 32 | return ++row_num; |
---|
| 33 | } |
---|
| 34 | |
---|
[459] | 35 | void SkeletonSolverBase::_eraseCol(int) {} |
---|
| 36 | void SkeletonSolverBase::_eraseRow(int) {} |
---|
| 37 | |
---|
| 38 | void SkeletonSolverBase::_getColName(int, std::string &) const {} |
---|
| 39 | void SkeletonSolverBase::_setColName(int, const std::string &) {} |
---|
| 40 | int SkeletonSolverBase::_colByName(const std::string&) const { return -1; } |
---|
| 41 | |
---|
| 42 | void SkeletonSolverBase::_getRowName(int, std::string &) const {} |
---|
| 43 | void SkeletonSolverBase::_setRowName(int, const std::string &) {} |
---|
| 44 | int SkeletonSolverBase::_rowByName(const std::string&) const { return -1; } |
---|
| 45 | |
---|
| 46 | void SkeletonSolverBase::_setRowCoeffs(int, ExprIterator, ExprIterator) {} |
---|
| 47 | void SkeletonSolverBase::_getRowCoeffs(int, InsertIterator) const {} |
---|
| 48 | |
---|
| 49 | void SkeletonSolverBase::_setColCoeffs(int, ExprIterator, ExprIterator) {} |
---|
| 50 | void SkeletonSolverBase::_getColCoeffs(int, InsertIterator) const {} |
---|
| 51 | |
---|
| 52 | void SkeletonSolverBase::_setCoeff(int, int, Value) {} |
---|
| 53 | SkeletonSolverBase::Value SkeletonSolverBase::_getCoeff(int, int) const |
---|
| 54 | { return 0; } |
---|
| 55 | |
---|
| 56 | void SkeletonSolverBase::_setColLowerBound(int, Value) {} |
---|
| 57 | SkeletonSolverBase::Value SkeletonSolverBase::_getColLowerBound(int) const |
---|
| 58 | { return 0; } |
---|
| 59 | |
---|
| 60 | void SkeletonSolverBase::_setColUpperBound(int, Value) {} |
---|
| 61 | SkeletonSolverBase::Value SkeletonSolverBase::_getColUpperBound(int) const |
---|
| 62 | { return 0; } |
---|
| 63 | |
---|
| 64 | void SkeletonSolverBase::_setRowLowerBound(int, Value) {} |
---|
| 65 | SkeletonSolverBase::Value SkeletonSolverBase::_getRowLowerBound(int) const |
---|
| 66 | { return 0; } |
---|
| 67 | |
---|
| 68 | void SkeletonSolverBase::_setRowUpperBound(int, Value) {} |
---|
| 69 | SkeletonSolverBase::Value SkeletonSolverBase::_getRowUpperBound(int) const |
---|
| 70 | { return 0; } |
---|
| 71 | |
---|
| 72 | void SkeletonSolverBase::_setObjCoeffs(ExprIterator, ExprIterator) {} |
---|
| 73 | void SkeletonSolverBase::_getObjCoeffs(InsertIterator) const {}; |
---|
| 74 | |
---|
| 75 | void SkeletonSolverBase::_setObjCoeff(int, Value) {} |
---|
| 76 | SkeletonSolverBase::Value SkeletonSolverBase::_getObjCoeff(int) const |
---|
| 77 | { return 0; } |
---|
| 78 | |
---|
| 79 | void SkeletonSolverBase::_setSense(Sense) {} |
---|
| 80 | SkeletonSolverBase::Sense SkeletonSolverBase::_getSense() const |
---|
| 81 | { return MIN; } |
---|
| 82 | |
---|
| 83 | void SkeletonSolverBase::_clear() { |
---|
| 84 | row_num = col_num = 0; |
---|
[458] | 85 | } |
---|
| 86 | |
---|
[576] | 87 | void SkeletonSolverBase::_messageLevel(MessageLevel) {} |
---|
| 88 | |
---|
[459] | 89 | LpSkeleton::SolveExitStatus LpSkeleton::_solve() { return SOLVED; } |
---|
[458] | 90 | |
---|
[459] | 91 | LpSkeleton::Value LpSkeleton::_getPrimal(int) const { return 0; } |
---|
| 92 | LpSkeleton::Value LpSkeleton::_getDual(int) const { return 0; } |
---|
| 93 | LpSkeleton::Value LpSkeleton::_getPrimalValue() const { return 0; } |
---|
[458] | 94 | |
---|
[459] | 95 | LpSkeleton::Value LpSkeleton::_getPrimalRay(int) const { return 0; } |
---|
| 96 | LpSkeleton::Value LpSkeleton::_getDualRay(int) const { return 0; } |
---|
[458] | 97 | |
---|
[459] | 98 | LpSkeleton::ProblemType LpSkeleton::_getPrimalType() const |
---|
| 99 | { return UNDEFINED; } |
---|
[458] | 100 | |
---|
[459] | 101 | LpSkeleton::ProblemType LpSkeleton::_getDualType() const |
---|
| 102 | { return UNDEFINED; } |
---|
[458] | 103 | |
---|
[459] | 104 | LpSkeleton::VarStatus LpSkeleton::_getColStatus(int) const |
---|
| 105 | { return BASIC; } |
---|
[458] | 106 | |
---|
[459] | 107 | LpSkeleton::VarStatus LpSkeleton::_getRowStatus(int) const |
---|
| 108 | { return BASIC; } |
---|
[458] | 109 | |
---|
[540] | 110 | LpSkeleton* LpSkeleton::newSolver() const |
---|
[459] | 111 | { return static_cast<LpSkeleton*>(0); } |
---|
[458] | 112 | |
---|
[540] | 113 | LpSkeleton* LpSkeleton::cloneSolver() const |
---|
[459] | 114 | { return static_cast<LpSkeleton*>(0); } |
---|
[458] | 115 | |
---|
[459] | 116 | const char* LpSkeleton::_solverName() const { return "LpSkeleton"; } |
---|
[458] | 117 | |
---|
[459] | 118 | MipSkeleton::SolveExitStatus MipSkeleton::_solve() |
---|
| 119 | { return SOLVED; } |
---|
[458] | 120 | |
---|
[459] | 121 | MipSkeleton::Value MipSkeleton::_getSol(int) const { return 0; } |
---|
| 122 | MipSkeleton::Value MipSkeleton::_getSolValue() const { return 0; } |
---|
[458] | 123 | |
---|
[459] | 124 | MipSkeleton::ProblemType MipSkeleton::_getType() const |
---|
| 125 | { return UNDEFINED; } |
---|
[458] | 126 | |
---|
[540] | 127 | MipSkeleton* MipSkeleton::newSolver() const |
---|
[459] | 128 | { return static_cast<MipSkeleton*>(0); } |
---|
[458] | 129 | |
---|
[540] | 130 | MipSkeleton* MipSkeleton::cloneSolver() const |
---|
[459] | 131 | { return static_cast<MipSkeleton*>(0); } |
---|
[458] | 132 | |
---|
[459] | 133 | const char* MipSkeleton::_solverName() const { return "MipSkeleton"; } |
---|
[458] | 134 | |
---|
| 135 | } //namespace lemon |
---|
| 136 | |
---|