BB_cut.hpp
Go to the documentation of this file.
1 // (C) Copyright International Business Machines Corporation 2006, 2007
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Authors :
6 // Laszlo Ladanyi, International Business Machines Corporation
7 // Pierre Bonami, Carnegie Mellon University
8 
9 #ifndef _BB_CUT_H
10 #define _BB_CUT_H
11 
12 #include "BCP_cut.hpp"
13 #include "BCP_mempool.hpp"
14 #include "OsiRowCut.hpp"
15 
16 class BCP_buffer;
17 
20 /****************************************************************************/
21 class BB_cut : public BCP_cut_algo, public OsiRowCut {
22 
23 private:
24 
25  static BCP_MemPool memPool;
26 
27 public:
28 
29  static inline void * operator new(size_t size) {
30  return memPool.alloc(size);
31  }
32 
33  static inline void operator delete(void *p, size_t size) {
34  memPool.free(p, size);
35  }
36 
38  void pack(BCP_buffer& buf) const;
39 
42  BB_cut(BCP_buffer& buf);
44 
46  BB_cut(const OsiRowCut& cut);
47 
49  ~BB_cut() {}
50 };
51 
52 #endif
BB_cut(BCP_buffer &buf)
Constructor from content of buffer.
Definition: BB_cut.cpp:44
This is the class from which the user should derive her own algorithmic cuts.
Definition: BCP_cut.hpp:242
~BB_cut()
Destructor.
Definition: BB_cut.hpp:49
void free(void *p, size_t n)
Definition: BCP_mempool.hpp:68
void pack(BCP_buffer &buf) const
Packing cut to a buffer.
Definition: BB_cut.cpp:33
void * alloc(size_t n)
Definition: BCP_mempool.hpp:28
Simple representation of a cut by storing non zero coefficients only.
Definition: BB_cut.hpp:64
static BCP_MemPool memPool
Definition: BB_cut.hpp:68
This class describes the message buffer used for all processes of BCP.
Definition: BCP_buffer.hpp:39