1 /* $Id$ 2 * 3 * Name: CouennePSDcon.hpp 4 * Author: Pietro Belotti 5 * Purpose: define the class of positive semidefinite constraints 6 * 7 * This file is licensed under the Eclipse Public License (EPL) 8 */ 9 10 #ifndef CouennePSDcon_hpp 11 #define CouennePSDcon_hpp 12 13 #include "CouenneProblemElem.hpp" 14 #include <iostream> 15 16 namespace Couenne { 17 18 class CouenneExprMatrix; 19 class CouenneProblem; 20 class Domain; 21 22 /// Class to represent positive semidefinite constraints ////////////////// 23 24 class CouennePSDcon: public CouenneConstraint { 25 26 protected: 27 28 CouenneExprMatrix *X_; ///< contains indices of matrix X \succeq 0 29 30 public: 31 32 /// Constructor CouennePSDcon(CouenneExprMatrix * X)33 CouennePSDcon (CouenneExprMatrix *X): 34 CouenneConstraint (), 35 X_ (X) {} 36 37 /// Destructor 38 ~CouennePSDcon (); 39 40 /// Copy constructor 41 CouennePSDcon (const CouennePSDcon &c, Domain *d = NULL); 42 43 /// Assignment operator 44 CouennePSDcon &operator= (const CouennePSDcon &c); 45 46 /// Cloning method clone(Domain * d=NULL) const47 inline CouenneConstraint *clone (Domain *d = NULL) const 48 {return new CouennePSDcon (*this, d);} 49 50 /// return X getX() const51 CouenneExprMatrix *getX () const {return X_;} 52 53 /// Decompose body of constraint through auxiliary variables 54 exprAux *standardize (CouenneProblem *); 55 56 /// Print constraint 57 void print (std::ostream & = std::cout); 58 }; 59 } 60 61 #endif 62