equal
deleted
inserted
replaced
194 /// which you can use in range-based for loops, STL algorithms, etc. |
194 /// which you can use in range-based for loops, STL algorithms, etc. |
195 /// For example you can write: |
195 /// For example you can write: |
196 ///\code |
196 ///\code |
197 /// for(auto c: lp.cols()) |
197 /// for(auto c: lp.cols()) |
198 /// doSomething(c); |
198 /// doSomething(c); |
|
199 ///\endcode |
199 LemonRangeWrapper1<ColIt, LpBase> cols() { |
200 LemonRangeWrapper1<ColIt, LpBase> cols() { |
200 return LemonRangeWrapper1<ColIt, LpBase>(*this); |
201 return LemonRangeWrapper1<ColIt, LpBase>(*this); |
201 } |
202 } |
202 |
203 |
203 |
204 |
304 /// which you can use in range-based for loops, STL algorithms, etc. |
305 /// which you can use in range-based for loops, STL algorithms, etc. |
305 /// For example you can write: |
306 /// For example you can write: |
306 ///\code |
307 ///\code |
307 /// for(auto c: lp.rows()) |
308 /// for(auto c: lp.rows()) |
308 /// doSomething(c); |
309 /// doSomething(c); |
|
310 ///\endcode |
309 LemonRangeWrapper1<RowIt, LpBase> rows() { |
311 LemonRangeWrapper1<RowIt, LpBase> rows() { |
310 return LemonRangeWrapper1<RowIt, LpBase>(*this); |
312 return LemonRangeWrapper1<RowIt, LpBase>(*this); |
311 } |
313 } |
312 |
314 |
313 |
315 |
655 |
657 |
656 ///Linear expression of rows |
658 ///Linear expression of rows |
657 |
659 |
658 ///This data structure represents a column of the matrix, |
660 ///This data structure represents a column of the matrix, |
659 ///thas is it strores a linear expression of the dual variables |
661 ///thas is it strores a linear expression of the dual variables |
660 ///(\ref Row "Row"s). |
662 ///(\ref LpBase::Row "Row"s). |
661 /// |
663 /// |
662 ///There are several ways to access and modify the contents of this |
664 ///There are several ways to access and modify the contents of this |
663 ///container. |
665 ///container. |
664 ///\code |
666 ///\code |
665 ///e[v]=5; |
667 ///e[v]=5; |
672 ///for(LpBase::DualExpr::ConstCoeffIt i(e);i!=INVALID;++i) |
674 ///for(LpBase::DualExpr::ConstCoeffIt i(e);i!=INVALID;++i) |
673 /// s+=*i; |
675 /// s+=*i; |
674 ///\endcode |
676 ///\endcode |
675 ///(This code computes the sum of all coefficients). |
677 ///(This code computes the sum of all coefficients). |
676 ///- Numbers (<tt>double</tt>'s) |
678 ///- Numbers (<tt>double</tt>'s) |
677 ///and variables (\ref Row "Row"s) directly convert to an |
679 ///and variables (\ref LpBase::Row "Row"s) directly convert to an |
678 ///\ref DualExpr and the usual linear operations are defined, so |
680 ///\ref DualExpr and the usual linear operations are defined, so |
679 ///\code |
681 ///\code |
680 ///v+w |
682 ///v+w |
681 ///2*v-3.12*(v-w/2) |
683 ///2*v-3.12*(v-w/2) |
682 ///v*2.1+(3*v+(v*12+w)*3)/2 |
684 ///v*2.1+(3*v+(v*12+w)*3)/2 |
1184 /// |
1186 /// |
1185 ///This magic function takes a container as its argument and fills |
1187 ///This magic function takes a container as its argument and fills |
1186 ///its elements with new row (i.e. variables) |
1188 ///its elements with new row (i.e. variables) |
1187 ///\param t can be |
1189 ///\param t can be |
1188 ///- a standard STL compatible iterable container with |
1190 ///- a standard STL compatible iterable container with |
1189 ///\ref Row as its \c values_type like |
1191 ///\ref LpBase::Row "Row" as its \c values_type like |
1190 ///\code |
1192 ///\code |
1191 ///std::vector<LpBase::Row> |
1193 ///std::vector<LpBase::Row> |
1192 ///std::list<LpBase::Row> |
1194 ///std::list<LpBase::Row> |
1193 ///\endcode |
1195 ///\endcode |
1194 ///- a standard STL compatible iterable container with |
1196 ///- a standard STL compatible iterable container with |
1195 ///\ref Row as its \c mapped_type like |
1197 ///\ref LpBase::Row "Row" as its \c mapped_type like |
1196 ///\code |
1198 ///\code |
1197 ///std::map<AnyType,LpBase::Row> |
1199 ///std::map<AnyType,LpBase::Row> |
1198 ///\endcode |
1200 ///\endcode |
1199 ///- an iterable lemon \ref concepts::WriteMap "write map" like |
1201 ///- an iterable lemon \ref concepts::WriteMap "write map" like |
1200 ///\code |
1202 ///\code |