Dip  0.92.4
DecompMemPool.h
Go to the documentation of this file.
1 //===========================================================================//
2 // This file is part of the Decomp Solver Framework. //
3 // //
4 // Decomp is distributed under the Common Public License as part of the //
5 // COIN-OR repository (http://www.coin-or.org). //
6 // //
7 // Author: Matthew Galati, Lehigh University //
8 // //
9 // Copyright (C) 2002-2007, Lehigh University, Matthew Galati, and Ted Ralphs//
10 // All Rights Reserved. //
11 //===========================================================================//
12 
13 #ifndef DECOMP_MEMPOOL_INCLUDED
14 #define DECOMP_MEMPOOL_INCLUDED
15 
16 #include "CoinError.hpp"
17 
18 // --------------------------------------------------------------------- //
19 class DecompMemPool {
20 public:
21  double* dblArrNCoreCols;
22  double* dblArrNCoreRows;
23 
24 public:
25  void allocateMemory(const int nCoreCols,
26  const int nCoreRows) throw(CoinError) {
27  if (nCoreCols > 0) {
28  dblArrNCoreCols = new double[nCoreCols];
29  CoinAssertHint(dblArrNCoreCols, "Error: Out of Memory");
30  }
31 
32  if (nCoreRows > 0) {
33  dblArrNCoreRows = new double[nCoreRows];
34  CoinAssertHint(dblArrNCoreRows, "Error: Out of Memory");
35  }
36  }
37 
38 public:
40  dblArrNCoreCols(0),
41  dblArrNCoreRows(0) {
42  }
46  }
47 };
48 
49 #endif
#define UTIL_DELARR(x)
Definition: UtilMacros.h:29
#define CoinAssertHint(expression, hint)
Definition: CoinError.hpp:184
void allocateMemory(const int nCoreCols, const int nCoreRows)
Definition: DecompMemPool.h:25
double * dblArrNCoreRows
Definition: DecompMemPool.h:25
Error Class thrown by an exception.
Definition: CoinError.hpp:42
double * dblArrNCoreCols
Definition: DecompMemPool.h:24