1.1 --- a/lemon/lp_base.h Fri Aug 05 09:33:42 2011 +0200
1.2 +++ b/lemon/lp_base.h Mon Aug 08 12:36:16 2011 +0200
1.3 @@ -2,7 +2,7 @@
1.4 *
1.5 * This file is a part of LEMON, a generic C++ optimization library.
1.6 *
1.7 - * Copyright (C) 2003-2008
1.8 + * Copyright (C) 2003-2011
1.9 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.10 * (Egervary Research Group on Combinatorial Optimization, EGRES).
1.11 *
1.12 @@ -82,7 +82,7 @@
1.13 /// Verbose output.
1.14 MESSAGE_VERBOSE
1.15 };
1.16 -
1.17 +
1.18
1.19 ///The floating point type used by the solver
1.20 typedef double Value;
1.21 @@ -114,14 +114,14 @@
1.22 typedef Value ExprValue;
1.23 typedef True LpCol;
1.24 /// Default constructor
1.25 -
1.26 +
1.27 /// \warning The default constructor sets the Col to an
1.28 /// undefined value.
1.29 Col() {}
1.30 /// Invalid constructor \& conversion.
1.31 -
1.32 +
1.33 /// This constructor initializes the Col to be invalid.
1.34 - /// \sa Invalid for more details.
1.35 + /// \sa Invalid for more details.
1.36 Col(const Invalid&) : _id(-1) {}
1.37 /// Equality operator
1.38
1.39 @@ -156,12 +156,12 @@
1.40 const LpBase *_solver;
1.41 public:
1.42 /// Default constructor
1.43 -
1.44 +
1.45 /// \warning The default constructor sets the iterator
1.46 /// to an undefined value.
1.47 ColIt() {}
1.48 /// Sets the iterator to the first Col
1.49 -
1.50 +
1.51 /// Sets the iterator to the first Col.
1.52 ///
1.53 ColIt(const LpBase &solver) : _solver(&solver)
1.54 @@ -169,12 +169,12 @@
1.55 _solver->cols.firstItem(_id);
1.56 }
1.57 /// Invalid constructor \& conversion
1.58 -
1.59 +
1.60 /// Initialize the iterator to be invalid.
1.61 /// \sa Invalid for more details.
1.62 ColIt(const Invalid&) : Col(INVALID) {}
1.63 /// Next column
1.64 -
1.65 +
1.66 /// Assign the iterator to the next column.
1.67 ///
1.68 ColIt &operator++()
1.69 @@ -209,14 +209,14 @@
1.70 typedef Value ExprValue;
1.71 typedef True LpRow;
1.72 /// Default constructor
1.73 -
1.74 +
1.75 /// \warning The default constructor sets the Row to an
1.76 /// undefined value.
1.77 Row() {}
1.78 /// Invalid constructor \& conversion.
1.79 -
1.80 +
1.81 /// This constructor initializes the Row to be invalid.
1.82 - /// \sa Invalid for more details.
1.83 + /// \sa Invalid for more details.
1.84 Row(const Invalid&) : _id(-1) {}
1.85 /// Equality operator
1.86
1.87 @@ -224,7 +224,7 @@
1.88 /// the same LP row or both are invalid.
1.89 bool operator==(Row r) const {return _id == r._id;}
1.90 /// Inequality operator
1.91 -
1.92 +
1.93 /// \sa operator==(Row r)
1.94 ///
1.95 bool operator!=(Row r) const {return _id != r._id;}
1.96 @@ -251,12 +251,12 @@
1.97 const LpBase *_solver;
1.98 public:
1.99 /// Default constructor
1.100 -
1.101 +
1.102 /// \warning The default constructor sets the iterator
1.103 /// to an undefined value.
1.104 RowIt() {}
1.105 /// Sets the iterator to the first Row
1.106 -
1.107 +
1.108 /// Sets the iterator to the first Row.
1.109 ///
1.110 RowIt(const LpBase &solver) : _solver(&solver)
1.111 @@ -264,12 +264,12 @@
1.112 _solver->rows.firstItem(_id);
1.113 }
1.114 /// Invalid constructor \& conversion
1.115 -
1.116 +
1.117 /// Initialize the iterator to be invalid.
1.118 /// \sa Invalid for more details.
1.119 RowIt(const Invalid&) : Row(INVALID) {}
1.120 /// Next row
1.121 -
1.122 +
1.123 /// Assign the iterator to the next row.
1.124 ///
1.125 RowIt &operator++()
1.126 @@ -347,7 +347,7 @@
1.127 public:
1.128 typedef True SolverExpr;
1.129 /// Default constructor
1.130 -
1.131 +
1.132 /// Construct an empty expression, the coefficients and
1.133 /// the constant component are initialized to zero.
1.134 Expr() : const_comp(0) {}
1.135 @@ -448,9 +448,9 @@
1.136 }
1.137
1.138 ///Iterator over the expression
1.139 -
1.140 - ///The iterator iterates over the terms of the expression.
1.141 - ///
1.142 +
1.143 + ///The iterator iterates over the terms of the expression.
1.144 + ///
1.145 ///\code
1.146 ///double s=0;
1.147 ///for(LpBase::Expr::CoeffIt i(e);i!=INVALID;++i)
1.148 @@ -464,7 +464,7 @@
1.149 public:
1.150
1.151 /// Sets the iterator to the first term
1.152 -
1.153 +
1.154 /// Sets the iterator to the first term of the expression.
1.155 ///
1.156 CoeffIt(Expr& e)
1.157 @@ -481,7 +481,7 @@
1.158 /// Returns the coefficient of the term
1.159 const Value& operator*() const { return _it->second; }
1.160 /// Next term
1.161 -
1.162 +
1.163 /// Assign the iterator to the next term.
1.164 ///
1.165 CoeffIt& operator++() { ++_it; return *this; }
1.166 @@ -493,9 +493,9 @@
1.167 };
1.168
1.169 /// Const iterator over the expression
1.170 -
1.171 - ///The iterator iterates over the terms of the expression.
1.172 - ///
1.173 +
1.174 + ///The iterator iterates over the terms of the expression.
1.175 + ///
1.176 ///\code
1.177 ///double s=0;
1.178 ///for(LpBase::Expr::ConstCoeffIt i(e);i!=INVALID;++i)
1.179 @@ -509,7 +509,7 @@
1.180 public:
1.181
1.182 /// Sets the iterator to the first term
1.183 -
1.184 +
1.185 /// Sets the iterator to the first term of the expression.
1.186 ///
1.187 ConstCoeffIt(const Expr& e)
1.188 @@ -524,7 +524,7 @@
1.189 const Value& operator*() const { return _it->second; }
1.190
1.191 /// Next term
1.192 -
1.193 +
1.194 /// Assign the iterator to the next term.
1.195 ///
1.196 ConstCoeffIt& operator++() { ++_it; return *this; }
1.197 @@ -673,7 +673,7 @@
1.198 public:
1.199 typedef True SolverExpr;
1.200 /// Default constructor
1.201 -
1.202 +
1.203 /// Construct an empty expression, the coefficients are
1.204 /// initialized to zero.
1.205 DualExpr() {}
1.206 @@ -708,7 +708,7 @@
1.207 }
1.208 }
1.209 /// \brief Removes the coefficients which's absolute value does
1.210 - /// not exceed \c epsilon.
1.211 + /// not exceed \c epsilon.
1.212 void simplify(Value epsilon = 0.0) {
1.213 std::map<int, Value>::iterator it=comps.begin();
1.214 while (it != comps.end()) {
1.215 @@ -757,9 +757,9 @@
1.216 }
1.217
1.218 ///Iterator over the expression
1.219 -
1.220 - ///The iterator iterates over the terms of the expression.
1.221 - ///
1.222 +
1.223 + ///The iterator iterates over the terms of the expression.
1.224 + ///
1.225 ///\code
1.226 ///double s=0;
1.227 ///for(LpBase::DualExpr::CoeffIt i(e);i!=INVALID;++i)
1.228 @@ -773,7 +773,7 @@
1.229 public:
1.230
1.231 /// Sets the iterator to the first term
1.232 -
1.233 +
1.234 /// Sets the iterator to the first term of the expression.
1.235 ///
1.236 CoeffIt(DualExpr& e)
1.237 @@ -791,7 +791,7 @@
1.238 const Value& operator*() const { return _it->second; }
1.239
1.240 /// Next term
1.241 -
1.242 +
1.243 /// Assign the iterator to the next term.
1.244 ///
1.245 CoeffIt& operator++() { ++_it; return *this; }
1.246 @@ -803,9 +803,9 @@
1.247 };
1.248
1.249 ///Iterator over the expression
1.250 -
1.251 - ///The iterator iterates over the terms of the expression.
1.252 - ///
1.253 +
1.254 + ///The iterator iterates over the terms of the expression.
1.255 + ///
1.256 ///\code
1.257 ///double s=0;
1.258 ///for(LpBase::DualExpr::ConstCoeffIt i(e);i!=INVALID;++i)
1.259 @@ -819,7 +819,7 @@
1.260 public:
1.261
1.262 /// Sets the iterator to the first term
1.263 -
1.264 +
1.265 /// Sets the iterator to the first term of the expression.
1.266 ///
1.267 ConstCoeffIt(const DualExpr& e)
1.268 @@ -834,7 +834,7 @@
1.269 const Value& operator*() const { return _it->second; }
1.270
1.271 /// Next term
1.272 -
1.273 +
1.274 /// Assign the iterator to the next term.
1.275 ///
1.276 ConstCoeffIt& operator++() { ++_it; return *this; }
1.277 @@ -1803,10 +1803,10 @@
1.278 ///The basis status of variables
1.279 enum VarStatus {
1.280 /// The variable is in the basis
1.281 - BASIC,
1.282 + BASIC,
1.283 /// The variable is free, but not basic
1.284 FREE,
1.285 - /// The variable has active lower bound
1.286 + /// The variable has active lower bound
1.287 LOWER,
1.288 /// The variable has active upper bound
1.289 UPPER,
1.290 @@ -1885,7 +1885,7 @@
1.291 return res;
1.292 }
1.293 /// Returns a component of the primal ray
1.294 -
1.295 +
1.296 /// The primal ray is solution of the modified primal problem,
1.297 /// where we change each finite bound to 0, and we looking for a
1.298 /// negative objective value in case of minimization, and positive
1.299 @@ -1919,7 +1919,7 @@
1.300 }
1.301
1.302 /// Returns a component of the dual ray
1.303 -
1.304 +
1.305 /// The dual ray is solution of the modified primal problem, where
1.306 /// we change each finite bound to 0 (i.e. the objective function
1.307 /// coefficients in the primal problem), and we looking for a
1.308 @@ -2061,7 +2061,7 @@
1.309 return res;
1.310 }
1.311 ///The value of the objective function
1.312 -
1.313 +
1.314 ///\return
1.315 ///- \ref INF or -\ref INF means either infeasibility or unboundedness
1.316 /// of the problem, depending on whether we minimize or maximize.