coin-Bcp
|
This class describes a warmstart information that consists solely of the dual vector. More...
#include <BCP_warmstart_dual.hpp>
Public Member Functions | |
virtual CoinWarmStart * | convert_to_CoinWarmStart () const |
Return an CoinWarmStart object that can be fed to the LP engine. More... | |
virtual BCP_storage_t | storage () const |
Return how the warmstarting info is stored. More... | |
virtual BCP_warmstart * | clone () const |
Make a replica of the current warmstart information. More... | |
virtual BCP_warmstart * | empty_wrt_this () const |
Create a warmstart info describing that no change should be done. More... | |
virtual int | storage_size () const |
Return how much memory it'll take to pack this warmstart info. More... | |
virtual void | update (const BCP_warmstart *const change) |
Update the current data with the one in the argument. More... | |
virtual BCP_warmstart * | as_change (const BCP_warmstart *const old_ws, const BCP_vec< int > &del_vars, const BCP_vec< int > &del_cuts, const double petol, const double detol) const |
Return a pointer to a warmstart info describing the currently stored data as a change with respect to that stored in old_ws . More... | |
void | pack (BCP_buffer &buf) const |
Pack the warmstart info into a buffer. More... | |
Constructors and destructor | |
BCP_warmstart_dual (BCP_buffer &buf) | |
Create the object by unpacking it from a buffer. More... | |
BCP_warmstart_dual (const double *first, const double *last) | |
Create an explicitly stored warmstart info by considering the double array [first,last) as the dual vector. More... | |
BCP_warmstart_dual (const BCP_warmstart_dual &ws) | |
Copy constructor. More... | |
virtual | ~BCP_warmstart_dual () |
Create the object by unpacking it from a buffer. More... | |
![]() | |
virtual | ~BCP_warmstart () |
The destructor is pure virtual. More... | |
Private Member Functions | |
BCP_warmstart_dual & | operator= (const BCP_warmstart_dual &) |
The assignment operator is declared but not defined to disable it. More... | |
BCP_warmstart_dual () | |
The default constructor creates an empty WrtParent warmstart info (i.e., no change wrt the parent). More... | |
Private Attributes | |
BCP_vec_change< double > | _dual |
The dual vector stored as a vector change. More... | |
This class describes a warmstart information that consists solely of the dual vector.
Definition at line 20 of file BCP_warmstart_dual.hpp.
|
inlineprivate |
The default constructor creates an empty WrtParent warmstart info (i.e., no change wrt the parent).
This is a private method since only the empty_wrt_this() method should be able to use this form of creation.
Definition at line 28 of file BCP_warmstart_dual.hpp.
Referenced by clone(), and empty_wrt_this().
|
inline |
Create the object by unpacking it from a buffer.
Definition at line 39 of file BCP_warmstart_dual.hpp.
|
inline |
Create an explicitly stored warmstart info by considering the double array [first,last)
as the dual vector.
Definition at line 42 of file BCP_warmstart_dual.hpp.
|
inline |
Copy constructor.
Definition at line 45 of file BCP_warmstart_dual.hpp.
|
inlinevirtual |
Create the object by unpacking it from a buffer.
Definition at line 47 of file BCP_warmstart_dual.hpp.
|
private |
The assignment operator is declared but not defined to disable it.
|
virtual |
Return an CoinWarmStart object that can be fed to the LP engine.
The implementation for this class will return an CoinWarmStartDual object.
Implements BCP_warmstart.
|
inlinevirtual |
Return how the warmstarting info is stored.
Implements BCP_warmstart.
Definition at line 56 of file BCP_warmstart_dual.hpp.
References _dual, and BCP_vec_change< T >::storage().
|
inlinevirtual |
Make a replica of the current warmstart information.
Implements BCP_warmstart.
Definition at line 58 of file BCP_warmstart_dual.hpp.
References BCP_warmstart_dual().
|
inlinevirtual |
Create a warmstart info describing that no change should be done.
This is really the task of a constructor, but BCP does not know the type of warmstart the user will use, so it will invoke this method for a warmstart that was created by the user. Tricky, isn't it?
Implements BCP_warmstart.
Definition at line 62 of file BCP_warmstart_dual.hpp.
References BCP_warmstart_dual().
|
inlinevirtual |
Return how much memory it'll take to pack this warmstart info.
It is used when comparing which sort of storage is smaller.
Implements BCP_warmstart.
Definition at line 68 of file BCP_warmstart_dual.hpp.
References _dual, and BCP_vec_change< T >::storage_size().
|
virtual |
Update the current data with the one in the argument.
If the argument is of explicit storage then just replace the current data. If it is relative and the current data is explicit then perform the update. Otherwise throw an exception.
Implements BCP_warmstart.
|
virtual |
Return a pointer to a warmstart info describing the currently stored data as a change with respect to that stored in old_ws
.
However, if the currently stored data is shorter to store than the change, then this method can return a copy of the current data! The current data must be explicitly stored and old_ws
must be either explicit or can contain no data. Otherwise an exception must be thrown.
old_ws | the old warmstart info |
del_vars | the indices of the variables that are deleted from the formulation old_ws was created for |
del_cuts | same for the cuts |
petol | primal zero tolerance |
detol | dual zero tolerance |
Implements BCP_warmstart.
|
inline |
Pack the warmstart info into a buffer.
Definition at line 83 of file BCP_warmstart_dual.hpp.
References _dual, and BCP_vec_change< T >::pack().
|
private |
The dual vector stored as a vector change.
Definition at line 32 of file BCP_warmstart_dual.hpp.
Referenced by pack(), storage(), and storage_size().