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