MC_solution Class Reference

#include <MC_solution.hpp>

Inheritance diagram for MC_solution:

Inheritance graph
[legend]
Collaboration diagram for MC_solution:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MC_solution (const BCP_vec< int > &sign, const MC_problem &mc, const int heurswitchround, const bool do_edge_switch_heur, const int struct_switch_heur)
 MC_solution ()
 ~MC_solution ()
virtual double objective_value () const
 The method returning the objective value of the solution.
MC_solutionoperator= (const MC_solution &sol)
BCP_bufferpack (BCP_buffer &buf) const
BCP_bufferunpack (BCP_buffer &buf)
void display (const BCP_string &fname) const
double compute_cost (const int m, const MC_graph_edge *edges)
double switch_improve (const MC_problem &mc, const int maxiter)
double edge_switch_improve (const MC_problem &mc, const int maxiter)
double ising_with_external_edge_switch_improve (const MC_problem &mc, const int maxiter)
double lk_switch_improve (const MC_problem &mc, const int maxiter)
double structure_switch_improve (const MC_problem &mc, const int struct_ind, const int maxiter)

Public Attributes

double cost
BCP_vec< int > sig

Detailed Description

Definition at line 14 of file MC_solution.hpp.


Constructor & Destructor Documentation

MC_solution::MC_solution ( const BCP_vec< int > &  sign,
const MC_problem mc,
const int  heurswitchround,
const bool  do_edge_switch_heur,
const int  struct_switch_heur 
)

Definition at line 441 of file MC_solution.cpp.

References BCP_vec< T >::back(), BCP_DBL_MAX, compute_cost(), cost, edge_switch_improve(), MC_problem::edges, MC_problem::ising_triangles, ising_with_external_edge_switch_improve(), k, m, MC_problem::num_edges, MC_problem::num_structure_type, objective_value(), BCP_vec< T >::push_back(), sig, BCP_vec< T >::size(), structure_switch_improve(), and switch_improve().

MC_solution::MC_solution (  )  [inline]

Definition at line 24 of file MC_solution.hpp.

MC_solution::~MC_solution (  )  [inline]

Definition at line 25 of file MC_solution.hpp.


Member Function Documentation

virtual double MC_solution::objective_value (  )  const [inline, virtual]

The method returning the objective value of the solution.

Implements BCP_solution.

Definition at line 27 of file MC_solution.hpp.

References cost.

Referenced by MC_tm::create_root(), display(), MC_tm::display_feasible_solution(), MC_lp::generate_mst_cuts(), MC_solution(), MC_update_solution(), MC_lp::solveToOpt(), and MC_tm::unpack_feasible_solution().

MC_solution & MC_solution::operator= ( const MC_solution sol  ) 

Definition at line 41 of file MC_solution.cpp.

References cost, and sig.

BCP_buffer & MC_solution::pack ( BCP_buffer buf  )  const

Definition at line 25 of file MC_solution.cpp.

References cost, BCP_buffer::pack(), and sig.

Referenced by MC_lp::pack_feasible_solution().

BCP_buffer & MC_solution::unpack ( BCP_buffer buf  ) 

Definition at line 33 of file MC_solution.cpp.

References cost, sig, and BCP_buffer::unpack().

Referenced by MC_tm::unpack_feasible_solution().

void MC_solution::display ( const BCP_string fname  )  const

Definition at line 417 of file MC_solution.cpp.

References BCP_string::c_str(), BCP_string::length(), objective_value(), sig, and BCP_vec< T >::size().

Referenced by MC_tm::display_feasible_solution().

double MC_solution::compute_cost ( const int  m,
const MC_graph_edge edges 
)

Definition at line 50 of file MC_solution.cpp.

References cost, and sig.

Referenced by edge_switch_improve(), ising_with_external_edge_switch_improve(), lk_switch_improve(), MC_solution(), structure_switch_improve(), and switch_improve().

double MC_solution::switch_improve ( const MC_problem mc,
const int  maxiter 
)

Definition at line 87 of file MC_solution.cpp.

References MC_graph_node::adj_list, BCP_vec< T >::begin(), compute_cost(), cost, MC_graph_node::degree, MC_problem::edges, MC_switch_cost(), n, MC_problem::nodes, MC_problem::num_edges, MC_problem::num_nodes, and sig.

Referenced by MC_solution().

double MC_solution::edge_switch_improve ( const MC_problem mc,
const int  maxiter 
)

Definition at line 129 of file MC_solution.cpp.

References MC_graph_node::adj_list, BCP_vec< T >::begin(), compute_cost(), MC_graph_edge::cost, cost, MC_graph_node::degree, MC_problem::edges, MC_graph_edge::head, k, m, MC_switch_cost(), MC_problem::nodes, MC_problem::num_edges, and sig.

Referenced by MC_solution().

double MC_solution::ising_with_external_edge_switch_improve ( const MC_problem mc,
const int  maxiter 
)

Definition at line 184 of file MC_solution.cpp.

References MC_graph_node::adj_list, BCP_vec< T >::begin(), compute_cost(), MC_graph_edge::cost, cost, MC_graph_node::degree, MC_problem::edges, MC_graph_edge::head, k, m, MC_switch_cost(), MC_problem::nodes, MC_problem::num_edges, MC_problem::num_nodes, and sig.

Referenced by MC_solution().

double MC_solution::lk_switch_improve ( const MC_problem mc,
const int  maxiter 
)

Definition at line 326 of file MC_solution.cpp.

References MC_graph_node::adj_list, BCP_vec< T >::begin(), compute_cost(), cost, MC_graph_node::degree, MC_problem::edges, MC_switch_cost(), n, MC_problem::nodes, MC_problem::num_edges, MC_problem::num_nodes, and sig.

double MC_solution::structure_switch_improve ( const MC_problem mc,
const int  struct_ind,
const int  maxiter 
)

Definition at line 273 of file MC_solution.cpp.

References compute_cost(), cost, e, MC_problem::edges, k, nb, MC_problem::num_edges, MC_problem::num_switch_structures, s, sig, and MC_problem::switch_structures.

Referenced by MC_solution().


Member Data Documentation

double MC_solution::cost

Definition at line 16 of file MC_solution.hpp.

Referenced by compute_cost(), edge_switch_improve(), ising_with_external_edge_switch_improve(), lk_switch_improve(), MC_solution(), objective_value(), operator=(), pack(), structure_switch_improve(), switch_improve(), and unpack().

BCP_vec<int> MC_solution::sig

Definition at line 17 of file MC_solution.hpp.

Referenced by compute_cost(), display(), MC_tm::display_feasible_solution(), edge_switch_improve(), ising_with_external_edge_switch_improve(), lk_switch_improve(), MC_solution(), operator=(), pack(), structure_switch_improve(), switch_improve(), and unpack().


The documentation for this class was generated from the following files:
Generated on Thu Nov 10 03:12:36 2011 by  doxygen 1.4.7