gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Remove \bug and \todo comments
0 2 0
default
2 files changed with 0 insertions and 14 deletions:
↑ Collapse diff ↑
Ignore white space 192 line context
... ...
@@ -62,194 +62,192 @@
62 62

	
63 63
    virtual void _getColName(int col, std::string& name) const;
64 64
    virtual void _setColName(int col, const std::string& name);
65 65
    virtual int _colByName(const std::string& name) const;
66 66

	
67 67
    virtual void _getRowName(int row, std::string& name) const;
68 68
    virtual void _setRowName(int row, const std::string& name);
69 69
    virtual int _rowByName(const std::string& name) const;
70 70

	
71 71
    virtual void _setRowCoeffs(int i, ExprIterator b, ExprIterator e);
72 72
    virtual void _getRowCoeffs(int i, InsertIterator b) const;
73 73

	
74 74
    virtual void _setColCoeffs(int i, ExprIterator b, ExprIterator e);
75 75
    virtual void _getColCoeffs(int i, InsertIterator b) const;
76 76

	
77 77
    virtual void _setCoeff(int row, int col, Value value);
78 78
    virtual Value _getCoeff(int row, int col) const;
79 79

	
80 80
    virtual void _setColLowerBound(int i, Value value);
81 81
    virtual Value _getColLowerBound(int i) const;
82 82

	
83 83
    virtual void _setColUpperBound(int i, Value value);
84 84
    virtual Value _getColUpperBound(int i) const;
85 85

	
86 86
    virtual void _setRowLowerBound(int i, Value value);
87 87
    virtual Value _getRowLowerBound(int i) const;
88 88

	
89 89
    virtual void _setRowUpperBound(int i, Value value);
90 90
    virtual Value _getRowUpperBound(int i) const;
91 91

	
92 92
    virtual void _setObjCoeffs(ExprIterator b, ExprIterator e);
93 93
    virtual void _getObjCoeffs(InsertIterator b) const;
94 94

	
95 95
    virtual void _setObjCoeff(int i, Value obj_coef);
96 96
    virtual Value _getObjCoeff(int i) const;
97 97

	
98 98
    virtual void _setSense(Sense);
99 99
    virtual Sense _getSense() const;
100 100

	
101 101
    virtual void _clear();
102 102

	
103 103
  public:
104 104

	
105 105
    ///Pointer to the underlying GLPK data structure.
106 106
    LPX *lpx() {return lp;}
107 107
    ///Const pointer to the underlying GLPK data structure.
108 108
    const LPX *lpx() const {return lp;}
109 109

	
110 110
    ///Returns the constraint identifier understood by GLPK.
111 111
    int lpxRow(Row r) const { return rows(id(r)); }
112 112

	
113 113
    ///Returns the variable identifier understood by GLPK.
114 114
    int lpxCol(Col c) const { return cols(id(c)); }
115 115

	
116 116
  };
117 117

	
118 118
  /// \brief Interface for the GLPK LP solver
119 119
  ///
120 120
  /// This class implements an interface for the GLPK LP solver.
121 121
  ///\ingroup lp_group
122 122
  class GlpkLp : public LpSolver, public GlpkBase {
123 123
  public:
124 124

	
125 125
    ///\e
126 126
    GlpkLp();
127 127
    ///\e
128 128
    GlpkLp(const GlpkLp&);
129 129

	
130 130
    ///\e
131 131
    virtual GlpkLp* cloneSolver() const;
132 132
    ///\e
133 133
    virtual GlpkLp* newSolver() const;
134 134

	
135 135
  private:
136 136

	
137 137
    mutable std::vector<double> _primal_ray;
138 138
    mutable std::vector<double> _dual_ray;
139 139

	
140 140
    void _clear_temporals();
141 141

	
142 142
  protected:
143 143

	
144 144
    virtual const char* _solverName() const;
145 145

	
146 146
    virtual SolveExitStatus _solve();
147 147
    virtual Value _getPrimal(int i) const;
148 148
    virtual Value _getDual(int i) const;
149 149

	
150 150
    virtual Value _getPrimalValue() const;
151 151

	
152 152
    virtual VarStatus _getColStatus(int i) const;
153 153
    virtual VarStatus _getRowStatus(int i) const;
154 154

	
155 155
    virtual Value _getPrimalRay(int i) const;
156 156
    virtual Value _getDualRay(int i) const;
157 157

	
158
    ///\todo It should be clarified
159
    ///
160 158
    virtual ProblemType _getPrimalType() const;
161 159
    virtual ProblemType _getDualType() const;
162 160

	
163 161
  public:
164 162

	
165 163
    ///Solve with primal simplex
166 164
    SolveExitStatus solvePrimal();
167 165

	
168 166
    ///Solve with dual simplex
169 167
    SolveExitStatus solveDual();
170 168

	
171 169
    ///Turns on or off the presolver
172 170

	
173 171
    ///Turns on (\c b is \c true) or off (\c b is \c false) the presolver
174 172
    ///
175 173
    ///The presolver is off by default.
176 174
    void presolver(bool b);
177 175

	
178 176
    ///Enum for \c messageLevel() parameter
179 177
    enum MessageLevel {
180 178
      /// no output (default value)
181 179
      MESSAGE_NO_OUTPUT = 0,
182 180
      /// error messages only
183 181
      MESSAGE_ERROR_MESSAGE = 1,
184 182
      /// normal output
185 183
      MESSAGE_NORMAL_OUTPUT = 2,
186 184
      /// full output (includes informational messages)
187 185
      MESSAGE_FULL_OUTPUT = 3
188 186
    };
189 187

	
190 188
  private:
191 189

	
192 190
    MessageLevel _message_level;
193 191

	
194 192
  public:
195 193

	
196 194
    ///Set the verbosity of the messages
197 195

	
198 196
    ///Set the verbosity of the messages
199 197
    ///
200 198
    ///\param m is the level of the messages output by the solver routines.
201 199
    void messageLevel(MessageLevel m);
202 200
  };
203 201

	
204 202
  /// \brief Interface for the GLPK MIP solver
205 203
  ///
206 204
  /// This class implements an interface for the GLPK MIP solver.
207 205
  ///\ingroup lp_group
208 206
  class GlpkMip : public MipSolver, public GlpkBase {
209 207
  public:
210 208

	
211 209
    ///\e
212 210
    GlpkMip();
213 211
    ///\e
214 212
    GlpkMip(const GlpkMip&);
215 213

	
216 214
    virtual GlpkMip* cloneSolver() const;
217 215
    virtual GlpkMip* newSolver() const;
218 216

	
219 217
  protected:
220 218

	
221 219
    virtual const char* _solverName() const;
222 220

	
223 221
    virtual ColTypes _getColType(int col) const;
224 222
    virtual void _setColType(int col, ColTypes col_type);
225 223

	
226 224
    virtual SolveExitStatus _solve();
227 225
    virtual ProblemType _getType() const;
228 226
    virtual Value _getSol(int i) const;
229 227
    virtual Value _getSolValue() const;
230 228

	
231 229
    ///Enum for \c messageLevel() parameter
232 230
    enum MessageLevel {
233 231
      /// no output (default value)
234 232
      MESSAGE_NO_OUTPUT = 0,
235 233
      /// error messages only
236 234
      MESSAGE_ERROR_MESSAGE = 1,
237 235
      /// normal output
238 236
      MESSAGE_NORMAL_OUTPUT = 2,
239 237
      /// full output (includes informational messages)
240 238
      MESSAGE_FULL_OUTPUT = 3
241 239
    };
242 240

	
243 241
  private:
244 242

	
245 243
    MessageLevel _message_level;
246 244

	
247 245
  public:
248 246

	
249 247
    ///Set the verbosity of the messages
250 248

	
251 249
    ///Set the verbosity of the messages
252 250
    ///
253 251
    ///\param m is the level of the messages output by the solver routines.
254 252
    void messageLevel(MessageLevel m);
255 253
  };
Ignore white space 6 line context
... ...
@@ -112,126 +112,114 @@
112 112
    virtual Value _getRowLowerBound(int i) const;
113 113

	
114 114
    /// The upper bound of a constraint (row) have to be given by an
115 115
    /// extended number of type Value, i.e. a finite number of type
116 116
    /// Value or \ref INF.
117 117
    virtual void _setRowUpperBound(int i, Value value);
118 118
    /// \e
119 119

	
120 120
    /// The upper bound of a constraint (row) is an
121 121
    /// extended number of type Value, i.e. a finite number of type
122 122
    /// Value or \ref INF.
123 123
    virtual Value _getRowUpperBound(int i) const;
124 124

	
125 125
    /// \e
126 126
    virtual void _setObjCoeffs(ExprIterator b, ExprIterator e);
127 127
    /// \e
128 128
    virtual void _getObjCoeffs(InsertIterator b) const;
129 129

	
130 130
    /// \e
131 131
    virtual void _setObjCoeff(int i, Value obj_coef);
132 132
    /// \e
133 133
    virtual Value _getObjCoeff(int i) const;
134 134

	
135 135
    ///\e
136 136
    virtual void _setSense(Sense);
137 137
    ///\e
138 138
    virtual Sense _getSense() const;
139 139

	
140 140
    ///\e
141 141
    virtual void _clear();
142 142

	
143 143
  };
144 144

	
145 145
  /// \brief Skeleton class for an LP solver interface
146 146
  ///
147 147
  ///This class does nothing, but it can serve as a skeleton when
148 148
  ///implementing an interface to new solvers.
149 149

	
150 150
  ///\ingroup lp_group
151 151
  class LpSkeleton : public LpSolver, public SkeletonSolverBase {
152 152
  public:
153 153
    ///\e
154 154
    LpSkeleton() : LpSolver(), SkeletonSolverBase() {}
155 155
    ///\e
156 156
    virtual LpSkeleton* newSolver() const;
157 157
    ///\e
158 158
    virtual LpSkeleton* cloneSolver() const;
159 159
  protected:
160 160

	
161 161
    ///\e
162 162
    virtual SolveExitStatus _solve();
163 163

	
164 164
    ///\e
165 165
    virtual Value _getPrimal(int i) const;
166 166
    ///\e
167 167
    virtual Value _getDual(int i) const;
168 168

	
169 169
    ///\e
170 170
    virtual Value _getPrimalValue() const;
171 171

	
172 172
    ///\e
173 173
    virtual Value _getPrimalRay(int i) const;
174 174
    ///\e
175 175
    virtual Value _getDualRay(int i) const;
176 176

	
177 177
    ///\e
178 178
    virtual ProblemType _getPrimalType() const;
179 179
    ///\e
180 180
    virtual ProblemType _getDualType() const;
181 181

	
182 182
    ///\e
183 183
    virtual VarStatus _getColStatus(int i) const;
184 184
    ///\e
185 185
    virtual VarStatus _getRowStatus(int i) const;
186 186

	
187 187
    ///\e
188 188
    virtual const char* _solverName() const;
189 189

	
190 190
  };
191 191

	
192 192
  /// \brief Skeleton class for a MIP solver interface
193 193
  ///
194 194
  ///This class does nothing, but it can serve as a skeleton when
195 195
  ///implementing an interface to new solvers.
196 196
  ///\ingroup lp_group
197 197
  class MipSkeleton : public MipSolver, public SkeletonSolverBase {
198 198
  public:
199 199
    ///\e
200 200
    MipSkeleton() : MipSolver(), SkeletonSolverBase() {}
201 201
    ///\e
202 202
    virtual MipSkeleton* newSolver() const;
203 203
    ///\e
204 204
    virtual MipSkeleton* cloneSolver() const;
205 205

	
206 206
  protected:
207 207
    ///\e
208

	
209
    ///\bug Wrong interface
210
    ///
211 208
    virtual SolveExitStatus _solve();
212 209

	
213 210
    ///\e
214

	
215
    ///\bug Wrong interface
216
    ///
217 211
    virtual Value _getSol(int i) const;
218 212

	
219 213
    ///\e
220

	
221
    ///\bug Wrong interface
222
    ///
223 214
    virtual Value _getSolValue() const;
224 215

	
225 216
    ///\e
226

	
227
    ///\bug Wrong interface
228
    ///
229 217
    virtual ProblemType _getType() const;
230 218

	
231 219
    ///\e
232 220
    virtual const char* _solverName() const;
233 221
  };
234 222

	
235 223
} //namespace lemon
236 224

	
237 225
#endif
0 comments (0 inline)