equal
deleted
inserted
replaced
197 |
197 |
198 static int id(const Row& row) { return row.id; } |
198 static int id(const Row& row) { return row.id; } |
199 |
199 |
200 protected: |
200 protected: |
201 |
201 |
202 int _lpId(const Col& col) const { |
202 int _lpId(const Col& c) const { |
203 return cols.floatingId(id(col)); |
203 return cols.floatingId(id(c)); |
204 } |
204 } |
205 |
205 |
206 int _lpId(const Row& row) const { |
206 int _lpId(const Row& r) const { |
207 return rows.floatingId(id(row)); |
207 return rows.floatingId(id(r)); |
208 } |
208 } |
209 |
209 |
210 Col _item(int id, Col) const { |
210 Col _item(int i, Col) const { |
211 return Col(cols.fixId(id)); |
211 return Col(cols.fixId(i)); |
212 } |
212 } |
213 |
213 |
214 Row _item(int id, Row) const { |
214 Row _item(int i, Row) const { |
215 return Row(rows.fixId(id)); |
215 return Row(rows.fixId(i)); |
216 } |
216 } |
217 |
217 |
218 |
218 |
219 public: |
219 public: |
220 |
220 |
889 |
889 |
890 ///\param e is a dual linear expression (see \ref DualExpr) |
890 ///\param e is a dual linear expression (see \ref DualExpr) |
891 ///\param obj is the corresponding component of the objective |
891 ///\param obj is the corresponding component of the objective |
892 ///function. It is 0 by default. |
892 ///function. It is 0 by default. |
893 ///\return The created column. |
893 ///\return The created column. |
894 Col addCol(const DualExpr &e, Value obj=0) { |
894 Col addCol(const DualExpr &e, Value o = 0) { |
895 Col c=addCol(); |
895 Col c=addCol(); |
896 col(c,e); |
896 col(c,e); |
897 objCoeff(c,obj); |
897 objCoeff(c,o); |
898 return c; |
898 return c; |
899 } |
899 } |
900 |
900 |
901 ///Add a new empty row (i.e a new constraint) to the LP |
901 ///Add a new empty row (i.e a new constraint) to the LP |
902 |
902 |