3 #ifndef _BCP_SOLUTION_H
4 #define _BCP_SOLUTION_H
virtual double objective_value() const =0
The method returning the objective value of the solution.
BCP_vec< BCP_var * > _vars
Vector of variables that are at nonzero level in the solution.
bool _delete_vars
An indicator to show whether the pointers in _vars should be deleted upon destruction or not...
BCP_vec< double > _values
Values of these variables in the solution.
void push_back(const_reference x)
Append x to the end of the vector.
void set_objective_value(double v)
Set the objective value of the solution.
double obj() const
Return the objective coefficient.
virtual ~BCP_solution_generic()
The destructor deletes the data members.
void add_entry(BCP_var *var, double value)
Append a variable and the corresponding value to the end of the appropriate vectors.
Abstract base class that defines members common to all types of variables.
virtual double objective_value() const
Return the objective value of the solution.
double _objective
The objective value of the solution.
void purge_ptr_vector(BCP_vec< T * > &pvec, typename BCP_vec< T * >::iterator first, typename BCP_vec< T * >::iterator last)
This function purges the entries [first,last) from the vector of pointers pvec.
virtual ~BCP_solution()
The virtual destructor ensures that the correct destructor is invoked.
This class holds a MIP feasible primal solution.
BCP_solution_generic(bool delvars=true)
The default constructor creates a solution with zero objective value.
void display() const
Display the solution.
This is the abstract base class for a solution to a Mixed Integer Programming problem.