src/lemon/lp_base.h
changeset 1428 9ba88ddc629c
parent 1397 30828157ae80
child 1431 ad44b1dd8013
equal deleted inserted replaced
10:e231dcdd64d4 11:b3e949f216be
   429 			       int length,
   429 			       int length,
   430                                int  const * indices, 
   430                                int  const * indices, 
   431                                Value  const * values ) = 0;
   431                                Value  const * values ) = 0;
   432     virtual void _setColLowerBound(int i, Value value) = 0;
   432     virtual void _setColLowerBound(int i, Value value) = 0;
   433     virtual void _setColUpperBound(int i, Value value) = 0;
   433     virtual void _setColUpperBound(int i, Value value) = 0;
   434     virtual void _setRowLowerBound(int i, Value value) = 0;
   434 //     virtual void _setRowLowerBound(int i, Value value) = 0;
   435     virtual void _setRowUpperBound(int i, Value value) = 0;
   435 //     virtual void _setRowUpperBound(int i, Value value) = 0;
   436     virtual void _setRowBounds(int i, Value lower, Value upper) = 0;
   436     virtual void _setRowBounds(int i, Value lower, Value upper) = 0;
   437     virtual void _setObjCoeff(int i, Value obj_coef) = 0;
   437     virtual void _setObjCoeff(int i, Value obj_coef) = 0;
   438     virtual void _clearObj()=0;
   438     virtual void _clearObj()=0;
   439 //     virtual void _setObj(int length,
   439 //     virtual void _setObj(int length,
   440 //                          int  const * indices, 
   440 //                          int  const * indices, 
   565 	  indices.push_back(cols.floatingId((*i).first.id));
   565 	  indices.push_back(cols.floatingId((*i).first.id));
   566 	  values.push_back((*i).second);
   566 	  values.push_back((*i).second);
   567 	}
   567 	}
   568       _setRowCoeffs(rows.floatingId(r.id),indices.size()-1,
   568       _setRowCoeffs(rows.floatingId(r.id),indices.size()-1,
   569 		    &indices[0],&values[0]);
   569 		    &indices[0],&values[0]);
   570       _setRowLowerBound(rows.floatingId(r.id),l-e.constComp());
   570 //       _setRowLowerBound(rows.floatingId(r.id),l-e.constComp());
   571       _setRowUpperBound(rows.floatingId(r.id),u-e.constComp());
   571 //       _setRowUpperBound(rows.floatingId(r.id),u-e.constComp());
       
   572        _setRowBounds(rows.floatingId(r.id),l-e.constComp(),u-e.constComp());
   572     }
   573     }
   573 
   574 
   574     ///Set a row (i.e a constaint) of the LP
   575     ///Set a row (i.e a constaint) of the LP
   575 
   576 
   576     ///\param r is the row to be modified
   577     ///\param r is the row to be modified
   631     void colBounds(Col c, Value lower, Value upper) {
   632     void colBounds(Col c, Value lower, Value upper) {
   632       _setColLowerBound(cols.floatingId(c.id),lower);
   633       _setColLowerBound(cols.floatingId(c.id),lower);
   633       _setColUpperBound(cols.floatingId(c.id),upper);
   634       _setColUpperBound(cols.floatingId(c.id),upper);
   634     }
   635     }
   635     
   636     
   636     /// Set the lower bound of a row (i.e a constraint)
   637 //     /// Set the lower bound of a row (i.e a constraint)
   637 
   638 
   638     /// The lower bound of a linear expression (row) has to be given by an 
   639 //     /// The lower bound of a linear expression (row) has to be given by an 
   639     /// extended number of type Value, i.e. a finite number of type 
   640 //     /// extended number of type Value, i.e. a finite number of type 
   640     /// Value or -\ref INF.
   641 //     /// Value or -\ref INF.
   641     void rowLowerBound(Row r, Value value) {
   642 //     void rowLowerBound(Row r, Value value) {
   642       _setRowLowerBound(rows.floatingId(r.id),value);
   643 //       _setRowLowerBound(rows.floatingId(r.id),value);
   643     };
   644 //     };
   644     /// Set the upper bound of a row (i.e a constraint)
   645 //     /// Set the upper bound of a row (i.e a constraint)
   645 
   646 
   646     /// The upper bound of a linear expression (row) has to be given by an 
   647 //     /// The upper bound of a linear expression (row) has to be given by an 
   647     /// extended number of type Value, i.e. a finite number of type 
   648 //     /// extended number of type Value, i.e. a finite number of type 
   648     /// Value or \ref INF.
   649 //     /// Value or \ref INF.
   649     void rowUpperBound(Row r, Value value) {
   650 //     void rowUpperBound(Row r, Value value) {
   650       _setRowUpperBound(rows.floatingId(r.id),value);
   651 //       _setRowUpperBound(rows.floatingId(r.id),value);
   651     };
   652 //     };
   652     /// Set the lower and the upper bounds of a row (i.e a variable)
   653 
       
   654     /// Set the lower and the upper bounds of a row (i.e a constraint)
   653 
   655 
   654     /// The lower and the upper bounds of
   656     /// The lower and the upper bounds of
   655     /// a constraint (row) have to be given by an 
   657     /// a constraint (row) have to be given by an 
   656     /// extended number of type Value, i.e. a finite number of type 
   658     /// extended number of type Value, i.e. a finite number of type 
   657     /// Value, -\ref INF or \ref INF.
   659     /// Value, -\ref INF or \ref INF.