coin-Bcp
BCP_warmstart_dual.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 #ifndef _BCP_WARMSTART_DUAL_H
4 #define _BCP_WARMSTART_DUAL_H
5 
6 #include "BCP_warmstart.hpp"
7 #include "BCP_vector_change.hpp"
8 
9 /* NOTE:
10  Doxygen gracefully generates description for all inherited methods if they
11  are not documented here. So the virtual methods are documented ONLY if they
12  have something additional to say.
13 */
14 
15 //#############################################################################
16 
21 private:
24 
29 
30 private:
35 public:
42  BCP_warmstart_dual(const double* first, const double* last) :
43  _dual(first, last) {}
46 
47  virtual ~BCP_warmstart_dual() {}
50  // Inherited methods --------------------------------------------------------
51 
54  virtual CoinWarmStart* convert_to_CoinWarmStart() const;
55 
56  virtual BCP_storage_t storage() const { return _dual.storage(); }
57 
58  virtual BCP_warmstart* clone() const {
59  return new BCP_warmstart_dual(*this);
60  }
61 
62  virtual BCP_warmstart* empty_wrt_this() const {
63  // The default constructor creates an empty WrtParent warmstart info
64  // (i.e., no change wrt the parent)
65  return new BCP_warmstart_dual();
66  }
67 
68  virtual int storage_size() const {
69  return _dual.storage_size();
70  }
71 
72  virtual void update(const BCP_warmstart* const change);
73 
74  virtual BCP_warmstart* as_change(const BCP_warmstart* const old_ws,
75  const BCP_vec<int>& del_vars,
76  const BCP_vec<int>& del_cuts,
77  const double petol,
78  const double detol) const;
79 
80  // Not inherited methods ----------------------------------------------------
81 
83  void pack(BCP_buffer& buf) const {
84  _dual.pack(buf);
85  }
86 };
87 
88 #endif
This class describes a warmstart information that consists solely of the dual vector.
virtual BCP_warmstart * empty_wrt_this() const
Create a warmstart info describing that no change should be done.
int storage_size() const
Return how much memory it&#39;ll take to pack this info.
Warmstarting information for the LP solver.
BCP_vec_change< double > _dual
The dual vector stored as a vector change.
virtual int storage_size() const
Return how much memory it&#39;ll take to pack this warmstart info.
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.
The data stored is with respect to the same kind of data in the parent of the search tree node...
Definition: BCP_enum.hpp:91
BCP_warmstart_dual()
The default constructor creates an empty WrtParent warmstart info (i.e., no change wrt the parent)...
BCP_warmstart_dual & operator=(const BCP_warmstart_dual &)
The assignment operator is declared but not defined to disable it.
BCP_storage_t storage() const
Return the storage type of the vector.
virtual BCP_storage_t storage() const
Return how the warmstarting info is stored.
virtual CoinWarmStart * convert_to_CoinWarmStart() const
Return an CoinWarmStart object that can be fed to the LP engine.
Abstract base class for warm start information.
This class describes the message buffer used for all processes of BCP.
Definition: BCP_buffer.hpp:39
virtual BCP_warmstart * clone() const
Make a replica of the current warmstart information.
BCP_warmstart_dual(BCP_buffer &buf)
Create the object by unpacking it from a buffer.
BCP_warmstart_dual(const BCP_warmstart_dual &ws)
Copy constructor.
virtual void update(const BCP_warmstart *const change)
Update the current data with the one in the argument.
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...
virtual ~BCP_warmstart_dual()
Create the object by unpacking it from a buffer.
BCP_storage_t
This enumerative constant describes how to store certain data for a search tree node.
Definition: BCP_enum.hpp:84
void pack(BCP_buffer &buf) const
Pack the data into a buffer.
void pack(BCP_buffer &buf) const
Pack the warmstart info into a buffer.