coin-Bcp
MC_solution.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 #ifndef _MC_SOLUTION_H
4 #define _MC_SOLUTION_H
5 
6 #include "BCP_vector.hpp"
7 #include "BCP_solution.hpp"
8 
9 class BCP_buffer;
10 class BCP_string;
11 class MC_problem;
12 class MC_graph_edge;
13 
14 class MC_solution : public BCP_solution {
15 public:
16  double cost;
18 public:
19  MC_solution(const BCP_vec<int>& sign,
20  const MC_problem& mc,
21  const int heurswitchround,
22  const bool do_edge_switch_heur,
23  const int struct_switch_heur);
24  MC_solution() : cost(0.0), sig() {}
26 
27  virtual double objective_value() const { return cost; }
28 
29 
30  MC_solution& operator=(const MC_solution& sol);
31 
32  BCP_buffer& pack(BCP_buffer& buf) const;
34 
35  void display(const BCP_string& fname) const;
36  double compute_cost(const int m, const MC_graph_edge* edges);
37  double switch_improve(const MC_problem& mc, const int maxiter);
38  double edge_switch_improve(const MC_problem& mc, const int maxiter);
40  const int maxiter);
41  double lk_switch_improve(const MC_problem& mc, const int maxiter);
42  double structure_switch_improve(const MC_problem& mc,
43  const int struct_ind, const int maxiter);
44 };
45 
46 #endif
double structure_switch_improve(const MC_problem &mc, const int struct_ind, const int maxiter)
double edge_switch_improve(const MC_problem &mc, const int maxiter)
This class is a very simple impelementation of a constant length string.
Definition: BCP_string.hpp:13
double compute_cost(const int m, const MC_graph_edge *edges)
BCP_buffer & pack(BCP_buffer &buf) const
BCP_vec< int > sig
Definition: MC_solution.hpp:17
virtual double objective_value() const
The method returning the objective value of the solution.
Definition: MC_solution.hpp:27
double switch_improve(const MC_problem &mc, const int maxiter)
This class describes the message buffer used for all processes of BCP.
Definition: BCP_buffer.hpp:39
double ising_with_external_edge_switch_improve(const MC_problem &mc, const int maxiter)
BCP_buffer & unpack(BCP_buffer &buf)
double lk_switch_improve(const MC_problem &mc, const int maxiter)
MC_solution & operator=(const MC_solution &sol)
void display(const BCP_string &fname) const
This is the abstract base class for a solution to a Mixed Integer Programming problem.