75 :
Constraint(master, sub, sense, rhs, dynamic, local, liftable), number_(number)
89 return out <<
"number = " << rhs.
number_ <<
" rhs = " << rhs.
rhs_ << std::endl;
97 virtual double coeff(
const Variable *v)
const;
105 virtual void print(std::ostream &out)
const {
126 return colvar->
coeff(number_);
virtual double coeff(const Constraint *con) const
Returns the coefficient of the constraint con.
The master of the optimization.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
friend std::ostream & operator<<(std::ostream &out, const NumCon &rhs)
The output operator writes the identification number and the right hand side to an output stream...
virtual void print(std::ostream &out) const
Writes the row format of the constraint on an output stream.
int number_
The identification number of the constraint.
int number() const
Returns the identification number of the constraint.
virtual ~NumCon()
The destructor.
Forms the virtual base class for all possible constraints given in pool format.
virtual double coeff(const Variable *v) const
Returns the coefficient of the variable v.
double rhs_
The right hand side of the constraint.
Forms the virtual base class for all possible variables given in pool format.
Constraints defined by a number.
Some optimization problems, in particular column generation problems, are better described from a var...
NumCon(Master *master, const Sub *sub, CSense::SENSE sense, bool dynamic, bool local, bool liftable, int number, double rhs)
Creates a constraint defined by number.