CouenneExprIVar.hpp

Go to the documentation of this file.
00001 /* $Id: CouenneExprIVar.hpp 490 2011-01-14 16:07:12Z pbelotti $
00002  *
00003  * Name:    exprIVar.hpp
00004  * Author:  Pietro Belotti
00005  * Purpose: definition of the class exprIVar for integer variables 
00006  *
00007  * (C) Carnegie-Mellon University, 2006-08. 
00008  * This file is licensed under the Eclipse Public License (EPL)
00009  */
00010 
00011 #ifndef COUENNE_EXPRIVAR_HPP
00012 #define COUENNE_EXPRIVAR_HPP
00013 
00014 #include <iostream>
00015 
00016 #include "CouenneTypes.hpp"
00017 #include "CouenneExpression.hpp"
00018 #include "CouenneExprVar.hpp"
00019 
00020 namespace Couenne {
00021 
00024 
00025 class exprIVar: public exprVar {
00026 
00027  public:
00028 
00030   exprIVar (int varIndex, Domain *d = NULL):
00031     exprVar (varIndex, d) {}
00032 
00034   exprIVar (const exprIVar &e, Domain *d = NULL):
00035     exprVar (e, d) {}
00036 
00038   virtual exprVar *clone (Domain *d = NULL) const
00039   {return new exprIVar (*this, d);}
00040 
00042   virtual void print (std::ostream &out = std::cout, bool = false) const
00043   {out << "y_" << varIndex_;}
00044 
00046   virtual inline bool isDefinedInteger ()
00047   {return true;}
00048 
00050   virtual inline bool isInteger ()
00051   {return true;}
00052 };
00053 
00054 }
00055 
00056 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 18 Jul 2013 for Couenne by  doxygen 1.6.1