/home/coin/SVN-release/Bcp-1.2.1/Bcp/src/include/BCP_cg_user.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2000, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 #ifndef _BCP_CG_USER_H
00004 #define _BCP_CG_USER_H
00005 
00006 // This file is fully docified.
00007 
00008 #include "BCP_math.hpp"
00009 #include "BCP_vector.hpp"
00010 #include "BCP_cg_param.hpp"
00011 #include "BCP_string.hpp"
00012 #include "BCP_USER.hpp"
00013 
00014 class BCP_cg_prob;
00015 class BCP_buffer;
00016 class BCP_var;
00017 class BCP_var_algo;
00018 class BCP_cut;
00019 class BCP_cut_algo;
00020 
00050 class BCP_cg_user : public BCP_user_class {
00051 private:
00052   BCP_cg_prob * p;
00053 public:
00060 
00061     void setCgProblemPointer(BCP_cg_prob * ptr) { p = ptr; }
00063     BCP_cg_prob * getCgProblemPointer() { return p; }
00069     double upper_bound() const;
00071     int current_phase() const;
00074     int current_level() const;
00077     int current_index() const;
00080     int current_iteration() const;
00085 
00086     char              get_param(const BCP_cg_par::chr_params key) const;
00088     int               get_param(const BCP_cg_par::int_params key) const;
00090     double            get_param(const BCP_cg_par::dbl_params key) const;
00092     const BCP_string& get_param(const BCP_cg_par::str_params key) const;
00093 
00095     void set_param(const BCP_cg_par::chr_params key, const bool val);
00097     void set_param(const BCP_cg_par::chr_params key, const char val);
00099     void set_param(const BCP_cg_par::int_params key, const int val);
00101     void set_param(const BCP_cg_par::dbl_params key, const double val);
00103     void set_param(const BCP_cg_par::str_params key, const char * val);
00110   void send_cut(const BCP_cut& cut);
00111 
00112   //===========================================================================
00115     BCP_cg_user() : p(0) {}
00118     virtual ~BCP_cg_user() {}
00121   //===========================================================================
00122   // Here are the user defined functions. For each of them a default is given
00123   // which can be overridden when the concrete user class is defined.
00124   //===========================================================================
00130   virtual void
00131   unpack_module_data(BCP_buffer & buf);
00132 
00133   //---------------------------------------------------------------------------
00139   virtual void
00140   unpack_primal_solution(BCP_buffer& buf);
00141    
00142   //---------------------------------------------------------------------------
00146   virtual void
00147   generate_cuts(BCP_vec<BCP_var*>& vars, BCP_vec<double>& x);
00148 };
00149 
00150 #endif

Generated on Thu Jan 15 03:00:58 2009 for coin-Bcp by  doxygen 1.4.7