/home/coin/SVN-release/Bcp-1.2.1/Bcp/examples/MaxCut/include/MC_solution.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2000, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 #ifndef _MC_SOLUTION_H
00004 #define _MC_SOLUTION_H
00005 
00006 #include "BCP_vector.hpp"
00007 #include "BCP_solution.hpp"
00008 
00009 class BCP_buffer;
00010 class BCP_string;
00011 class MC_problem;
00012 class MC_graph_edge;
00013 
00014 class MC_solution : public BCP_solution {
00015 public:
00016    double cost;
00017    BCP_vec<int> sig;
00018 public:
00019   MC_solution(const BCP_vec<int>& sign,
00020               const MC_problem& mc,
00021               const int heurswitchround,
00022               const bool do_edge_switch_heur,
00023               const int struct_switch_heur);
00024   MC_solution() : cost(0.0), sig() {}
00025   ~MC_solution() {}
00026 
00027   virtual double objective_value() const { return cost; }
00028 
00029 
00030   MC_solution& operator=(const MC_solution& sol);
00031 
00032   BCP_buffer& pack(BCP_buffer& buf) const;
00033   BCP_buffer& unpack(BCP_buffer& buf);
00034 
00035   void display(const BCP_string& fname) const;
00036   double compute_cost(const int m, const MC_graph_edge* edges);
00037   double switch_improve(const MC_problem& mc, const int maxiter);
00038   double edge_switch_improve(const MC_problem& mc, const int maxiter);
00039   double ising_with_external_edge_switch_improve(const MC_problem& mc,
00040                                                  const int maxiter);
00041   double lk_switch_improve(const MC_problem& mc, const int maxiter);
00042   double structure_switch_improve(const MC_problem& mc,
00043                                   const int struct_ind, const int maxiter);
00044 };
00045 
00046 #endif

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