OS_cut.hpp
Go to the documentation of this file.
1 /* $Id: OS_cut.hpp 2710 2009-06-10 21:13:43Z kmartin $ */
2 // Copyright (C) 2003, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 
5 #ifndef _OS_CUT_H
6 #define _OS_CUT_H
7 
8 #include "BCP_cut.hpp"
9 #include "BCP_mempool.hpp"
10 #include "OsiRowCut.hpp"
11 
12 //class BCP_buffer;
13 
16 /****************************************************************************/
17 class OS_cut : public BCP_cut_algo, public OsiRowCut {
18 
19 private:
20 
22 
23 public:
24 
25  static inline void * operator new(size_t size) {
26  return memPool.alloc( size);
27  }
28 
29  static inline void operator delete(void *p, size_t size) {
30  memPool.free(p, size);
31  }
32 
34  void pack(BCP_buffer& buf) const;
35 
38  OS_cut(BCP_buffer& buf);
40 
42  OS_cut(const OsiRowCut& cut);
43 
45  ~OS_cut() {}
46 };
47 
48 #endif
49 
50 
Simple representation of a cut by storing non zero coefficients only.
Definition: OS_cut.hpp:17
This is the class from which the user should derive her own algorithmic cuts.
Definition: BCP_cut.hpp:242
OS_cut(BCP_buffer &buf)
Constructor from content of buffer.
Definition: OS_cut.cpp:22
static BCP_MemPool memPool
Definition: OS_cut.hpp:21
void free(void *p, size_t n)
Definition: BCP_mempool.hpp:68
void * alloc(size_t n)
Definition: BCP_mempool.hpp:28
This class describes the message buffer used for all processes of BCP.
Definition: BCP_buffer.hpp:39
~OS_cut()
Destructor.
Definition: OS_cut.hpp:45
void pack(BCP_buffer &buf) const
Packing cut to a buffer.
Definition: OS_cut.cpp:11