deba@481
|
1 |
/* -*- mode: C++; indent-tabs-mode: nil; -*-
|
deba@481
|
2 |
*
|
deba@481
|
3 |
* This file is a part of LEMON, a generic C++ optimization library.
|
deba@481
|
4 |
*
|
deba@481
|
5 |
* Copyright (C) 2003-2008
|
deba@481
|
6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
|
deba@481
|
7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES).
|
deba@481
|
8 |
*
|
deba@481
|
9 |
* Permission to use, modify and distribute this software is granted
|
deba@481
|
10 |
* provided that this copyright notice appears in all copies. For
|
deba@481
|
11 |
* precise terms see the accompanying LICENSE file.
|
deba@481
|
12 |
*
|
deba@481
|
13 |
* This software is provided "AS IS" with no warranty of any kind,
|
deba@481
|
14 |
* express or implied, and with no claim as to its suitability for any
|
deba@481
|
15 |
* purpose.
|
deba@481
|
16 |
*
|
deba@481
|
17 |
*/
|
deba@481
|
18 |
|
deba@481
|
19 |
#include <lemon/lp_skeleton.h>
|
deba@481
|
20 |
|
deba@481
|
21 |
///\file
|
deba@481
|
22 |
///\brief A skeleton file to implement LP solver interfaces
|
deba@481
|
23 |
namespace lemon {
|
deba@481
|
24 |
|
deba@482
|
25 |
int SkeletonSolverBase::_addCol()
|
deba@481
|
26 |
{
|
deba@481
|
27 |
return ++col_num;
|
deba@481
|
28 |
}
|
deba@481
|
29 |
|
deba@482
|
30 |
int SkeletonSolverBase::_addRow()
|
deba@481
|
31 |
{
|
deba@481
|
32 |
return ++row_num;
|
deba@481
|
33 |
}
|
deba@481
|
34 |
|
deba@482
|
35 |
void SkeletonSolverBase::_eraseCol(int) {}
|
deba@482
|
36 |
void SkeletonSolverBase::_eraseRow(int) {}
|
deba@482
|
37 |
|
deba@482
|
38 |
void SkeletonSolverBase::_getColName(int, std::string &) const {}
|
deba@482
|
39 |
void SkeletonSolverBase::_setColName(int, const std::string &) {}
|
deba@482
|
40 |
int SkeletonSolverBase::_colByName(const std::string&) const { return -1; }
|
deba@482
|
41 |
|
deba@482
|
42 |
void SkeletonSolverBase::_getRowName(int, std::string &) const {}
|
deba@482
|
43 |
void SkeletonSolverBase::_setRowName(int, const std::string &) {}
|
deba@482
|
44 |
int SkeletonSolverBase::_rowByName(const std::string&) const { return -1; }
|
deba@482
|
45 |
|
deba@482
|
46 |
void SkeletonSolverBase::_setRowCoeffs(int, ExprIterator, ExprIterator) {}
|
deba@482
|
47 |
void SkeletonSolverBase::_getRowCoeffs(int, InsertIterator) const {}
|
deba@482
|
48 |
|
deba@482
|
49 |
void SkeletonSolverBase::_setColCoeffs(int, ExprIterator, ExprIterator) {}
|
deba@482
|
50 |
void SkeletonSolverBase::_getColCoeffs(int, InsertIterator) const {}
|
deba@482
|
51 |
|
deba@482
|
52 |
void SkeletonSolverBase::_setCoeff(int, int, Value) {}
|
deba@482
|
53 |
SkeletonSolverBase::Value SkeletonSolverBase::_getCoeff(int, int) const
|
deba@482
|
54 |
{ return 0; }
|
deba@482
|
55 |
|
deba@482
|
56 |
void SkeletonSolverBase::_setColLowerBound(int, Value) {}
|
deba@482
|
57 |
SkeletonSolverBase::Value SkeletonSolverBase::_getColLowerBound(int) const
|
deba@482
|
58 |
{ return 0; }
|
deba@482
|
59 |
|
deba@482
|
60 |
void SkeletonSolverBase::_setColUpperBound(int, Value) {}
|
deba@482
|
61 |
SkeletonSolverBase::Value SkeletonSolverBase::_getColUpperBound(int) const
|
deba@482
|
62 |
{ return 0; }
|
deba@482
|
63 |
|
deba@482
|
64 |
void SkeletonSolverBase::_setRowLowerBound(int, Value) {}
|
deba@482
|
65 |
SkeletonSolverBase::Value SkeletonSolverBase::_getRowLowerBound(int) const
|
deba@482
|
66 |
{ return 0; }
|
deba@482
|
67 |
|
deba@482
|
68 |
void SkeletonSolverBase::_setRowUpperBound(int, Value) {}
|
deba@482
|
69 |
SkeletonSolverBase::Value SkeletonSolverBase::_getRowUpperBound(int) const
|
deba@482
|
70 |
{ return 0; }
|
deba@482
|
71 |
|
deba@482
|
72 |
void SkeletonSolverBase::_setObjCoeffs(ExprIterator, ExprIterator) {}
|
deba@482
|
73 |
void SkeletonSolverBase::_getObjCoeffs(InsertIterator) const {};
|
deba@482
|
74 |
|
deba@482
|
75 |
void SkeletonSolverBase::_setObjCoeff(int, Value) {}
|
deba@482
|
76 |
SkeletonSolverBase::Value SkeletonSolverBase::_getObjCoeff(int) const
|
deba@482
|
77 |
{ return 0; }
|
deba@482
|
78 |
|
deba@482
|
79 |
void SkeletonSolverBase::_setSense(Sense) {}
|
deba@482
|
80 |
SkeletonSolverBase::Sense SkeletonSolverBase::_getSense() const
|
deba@482
|
81 |
{ return MIN; }
|
deba@482
|
82 |
|
deba@482
|
83 |
void SkeletonSolverBase::_clear() {
|
deba@482
|
84 |
row_num = col_num = 0;
|
deba@481
|
85 |
}
|
deba@481
|
86 |
|
deba@482
|
87 |
LpSkeleton::SolveExitStatus LpSkeleton::_solve() { return SOLVED; }
|
deba@481
|
88 |
|
deba@482
|
89 |
LpSkeleton::Value LpSkeleton::_getPrimal(int) const { return 0; }
|
deba@482
|
90 |
LpSkeleton::Value LpSkeleton::_getDual(int) const { return 0; }
|
deba@482
|
91 |
LpSkeleton::Value LpSkeleton::_getPrimalValue() const { return 0; }
|
deba@481
|
92 |
|
deba@482
|
93 |
LpSkeleton::Value LpSkeleton::_getPrimalRay(int) const { return 0; }
|
deba@482
|
94 |
LpSkeleton::Value LpSkeleton::_getDualRay(int) const { return 0; }
|
deba@481
|
95 |
|
deba@482
|
96 |
LpSkeleton::ProblemType LpSkeleton::_getPrimalType() const
|
deba@482
|
97 |
{ return UNDEFINED; }
|
deba@481
|
98 |
|
deba@482
|
99 |
LpSkeleton::ProblemType LpSkeleton::_getDualType() const
|
deba@482
|
100 |
{ return UNDEFINED; }
|
deba@481
|
101 |
|
deba@482
|
102 |
LpSkeleton::VarStatus LpSkeleton::_getColStatus(int) const
|
deba@482
|
103 |
{ return BASIC; }
|
deba@481
|
104 |
|
deba@482
|
105 |
LpSkeleton::VarStatus LpSkeleton::_getRowStatus(int) const
|
deba@482
|
106 |
{ return BASIC; }
|
deba@481
|
107 |
|
deba@482
|
108 |
LpSkeleton* LpSkeleton::_newSolver() const
|
deba@482
|
109 |
{ return static_cast<LpSkeleton*>(0); }
|
deba@481
|
110 |
|
deba@482
|
111 |
LpSkeleton* LpSkeleton::_cloneSolver() const
|
deba@482
|
112 |
{ return static_cast<LpSkeleton*>(0); }
|
deba@481
|
113 |
|
deba@482
|
114 |
const char* LpSkeleton::_solverName() const { return "LpSkeleton"; }
|
deba@481
|
115 |
|
deba@482
|
116 |
MipSkeleton::SolveExitStatus MipSkeleton::_solve()
|
deba@482
|
117 |
{ return SOLVED; }
|
deba@481
|
118 |
|
deba@482
|
119 |
MipSkeleton::Value MipSkeleton::_getSol(int) const { return 0; }
|
deba@482
|
120 |
MipSkeleton::Value MipSkeleton::_getSolValue() const { return 0; }
|
deba@481
|
121 |
|
deba@482
|
122 |
MipSkeleton::ProblemType MipSkeleton::_getType() const
|
deba@482
|
123 |
{ return UNDEFINED; }
|
deba@481
|
124 |
|
deba@482
|
125 |
MipSkeleton* MipSkeleton::_newSolver() const
|
deba@482
|
126 |
{ return static_cast<MipSkeleton*>(0); }
|
deba@481
|
127 |
|
deba@482
|
128 |
MipSkeleton* MipSkeleton::_cloneSolver() const
|
deba@482
|
129 |
{ return static_cast<MipSkeleton*>(0); }
|
deba@481
|
130 |
|
deba@482
|
131 |
const char* MipSkeleton::_solverName() const { return "MipSkeleton"; }
|
deba@481
|
132 |
|
deba@481
|
133 |
} //namespace lemon
|
deba@481
|
134 |
|