File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ Constraint& Constraint::operator=(const Constraint& expr)
2929 return *this ;
3030}
3131
32+ Constraint& Constraint::expr (const Constraint& expr)
33+ { repn = expr.repn ; return *this ; }
34+
35+ Constraint Constraint::expr () const
36+ { return *this ; }
37+
3238bool Constraint::active () const { return repn->active ; }
3339
3440void Constraint::activate () { repn->active = true ; }
Original file line number Diff line number Diff line change @@ -35,13 +35,19 @@ class Constraint {
3535
3636 Constraint& operator =(const Constraint& arg);
3737
38+ /* * Set the constraint */
39+ Constraint& expr (const Constraint& body);
40+ /* * \returns the constraint */
41+ Constraint expr () const ;
42+
3843 /* * \returns \c true if this is an inequality constraint */
3944 bool is_inequality () const ;
4045 /* * \returns \c true if this is an equality constraint */
4146 bool is_equality () const ;
4247 /* * \returns \c true if the constraint is feasible */
4348 bool is_feasible () const ;
4449
50+
4551 /* * \returns the expression for the constraint lower bound */
4652 Expression lower () const ;
4753 /* * \returns the expression for the constraint body */
You can’t perform that action at this time.
0 commit comments