/home/coin/SVN-release/Bcp-1.2.1/Bcp/src/include/BCP_vg_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_VG_USER_H
00004 #define _BCP_VG_USER_H
00005 
00006 // This file is fully docified.
00007 
00008 #include "BCP_math.hpp"
00009 #include "BCP_vector.hpp"
00010 #include "BCP_vg_param.hpp"
00011 #include "BCP_string.hpp"
00012 #include "BCP_USER.hpp"
00013 
00014 class BCP_vg_prob;
00015 class BCP_buffer;
00016 class BCP_cut;
00017 class BCP_cut_algo;
00018 class BCP_var;
00019 class BCP_var_algo;
00020 
00051 class BCP_vg_user : public BCP_user_class {
00052 private:
00053   BCP_vg_prob * p;
00054 public:
00061 
00062     void setVgProblemPointer(BCP_vg_prob * ptr) { p = ptr; }
00064     BCP_vg_prob * getVgProblemPointer() { return p; }
00070     double upper_bound() const;
00072     int current_phase() const;
00075     int current_level() const;
00078     int current_index() const;
00081     int current_iteration() const;
00086 
00087     char              get_param(const BCP_vg_par::chr_params key) const;
00089     int               get_param(const BCP_vg_par::int_params key) const;
00091     double            get_param(const BCP_vg_par::dbl_params key) const;
00093     const BCP_string& get_param(const BCP_vg_par::str_params key) const;
00094 
00096     void set_param(const BCP_vg_par::chr_params key, const bool val);
00098     void set_param(const BCP_vg_par::chr_params key, const char val);
00100     void set_param(const BCP_vg_par::int_params key, const int val);
00102     void set_param(const BCP_vg_par::dbl_params key, const double val);
00104     void set_param(const BCP_vg_par::str_params key, const char * val);
00107   //---------------------------------------------------------------------------
00112    void send_var(const BCP_var& var);
00113 
00114   //===========================================================================
00117     BCP_vg_user() : p(0) {}
00120     virtual ~BCP_vg_user() {}
00122   //===========================================================================
00123   // Here are the user defined functions. For each of them a default is given
00124   // which can be overridden when the concrete user class is defined.
00125   //===========================================================================
00131   virtual void
00132   unpack_module_data(BCP_buffer& buf);
00133 
00134   //---------------------------------------------------------------------------
00141   virtual void
00142   unpack_dual_solution(BCP_buffer& buf);
00143 
00144   //---------------------------------------------------------------------------
00148   virtual void
00149   generate_vars(BCP_vec<BCP_cut*>& cuts, BCP_vec<double>& pi);
00150 };
00151 
00152 //#############################################################################
00153 
00154 #endif

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