# Changeset 956:141f9c0db4a3 in lemon for lemon/lp_base.h

Ignore:
Timestamp:
03/06/10 15:35:12 (10 years ago)
Branch:
default
Children:
957:f802439d2b58, 959:38213abd2911, 1041:f112c18bc304
Phase:
public
Message:

Unify the sources (#339)

File:
1 edited

Unmodified
Removed
• ## lemon/lp_base.h

 r903 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2010 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). MESSAGE_VERBOSE }; ///The floating point type used by the solver typedef True LpCol; /// Default constructor /// \warning The default constructor sets the Col to an /// undefined value. Col() {} /// Invalid constructor \& conversion. /// This constructor initializes the Col to be invalid. /// \sa Invalid for more details. /// \sa Invalid for more details. Col(const Invalid&) : _id(-1) {} /// Equality operator public: /// Default constructor /// \warning The default constructor sets the iterator /// to an undefined value. ColIt() {} /// Sets the iterator to the first Col /// Sets the iterator to the first Col. /// } /// Invalid constructor \& conversion /// Initialize the iterator to be invalid. /// \sa Invalid for more details. ColIt(const Invalid&) : Col(INVALID) {} /// Next column /// Assign the iterator to the next column. /// typedef True LpRow; /// Default constructor /// \warning The default constructor sets the Row to an /// undefined value. Row() {} /// Invalid constructor \& conversion. /// This constructor initializes the Row to be invalid. /// \sa Invalid for more details. /// \sa Invalid for more details. Row(const Invalid&) : _id(-1) {} /// Equality operator bool operator==(Row r) const  {return _id == r._id;} /// Inequality operator /// \sa operator==(Row r) /// public: /// Default constructor /// \warning The default constructor sets the iterator /// to an undefined value. RowIt() {} /// Sets the iterator to the first Row /// Sets the iterator to the first Row. /// } /// Invalid constructor \& conversion /// Initialize the iterator to be invalid. /// \sa Invalid for more details. RowIt(const Invalid&) : Row(INVALID) {} /// Next row /// Assign the iterator to the next row. /// typedef True SolverExpr; /// Default constructor /// Construct an empty expression, the coefficients and /// the constant component are initialized to zero. ///Iterator over the expression ///The iterator iterates over the terms of the expression. /// ///The iterator iterates over the terms of the expression. /// ///\code ///double s=0; /// Sets the iterator to the first term /// Sets the iterator to the first term of the expression. /// const Value& operator*() const { return _it->second; } /// Next term /// Assign the iterator to the next term. /// /// Const iterator over the expression ///The iterator iterates over the terms of the expression. /// ///The iterator iterates over the terms of the expression. /// ///\code ///double s=0; /// Sets the iterator to the first term /// Sets the iterator to the first term of the expression. /// /// Next term /// Assign the iterator to the next term. /// typedef True SolverExpr; /// Default constructor /// Construct an empty expression, the coefficients are /// initialized to zero. } /// \brief Removes the coefficients which's absolute value does /// not exceed \c epsilon. /// not exceed \c epsilon. void simplify(Value epsilon = 0.0) { std::map::iterator it=comps.begin(); ///Iterator over the expression ///The iterator iterates over the terms of the expression. /// ///The iterator iterates over the terms of the expression. /// ///\code ///double s=0; /// Sets the iterator to the first term /// Sets the iterator to the first term of the expression. /// /// Next term /// Assign the iterator to the next term. /// ///Iterator over the expression ///The iterator iterates over the terms of the expression. /// ///The iterator iterates over the terms of the expression. /// ///\code ///double s=0; /// Sets the iterator to the first term /// Sets the iterator to the first term of the expression. /// /// Next term /// Assign the iterator to the next term. /// Row r; c.expr().simplify(); r._id = _addRowId(_addRow(c.lowerBounded()?c.lowerBound()-*c.expr():-INF, r._id = _addRowId(_addRow(c.lowerBounded()?c.lowerBound()-*c.expr():-INF, ExprIterator(c.expr().comps.begin(), cols), ExprIterator(c.expr().comps.end(), cols), enum VarStatus { /// The variable is in the basis BASIC, BASIC, /// The variable is free, but not basic FREE, /// The variable has active lower bound /// The variable has active lower bound LOWER, /// The variable has active upper bound } /// Returns a component of the primal ray /// The primal ray is solution of the modified primal problem, /// where we change each finite bound to 0, and we looking for a /// Returns a component of the dual ray /// The dual ray is solution of the modified primal problem, where /// we change each finite bound to 0 (i.e. the objective function } ///The value of the objective function ///\return ///- \ref INF or -\ref INF means either infeasibility or unboundedness
Note: See TracChangeset for help on using the changeset viewer.