Dip  0.92.4
DecompMemPool.h
Go to the documentation of this file.
1 //===========================================================================//
2 // This file is part of the DIP Solver Framework. //
3 // //
4 // DIP is distributed under the Eclipse Public License as part of the //
5 // COIN-OR repository (http://www.coin-or.org). //
6 // //
7 // Authors: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8 // Ted Ralphs, Lehigh University (ted@lehigh.edu) //
9 // Jiadong Wang, Lehigh University (jiw408@lehigh.edu) //
10 // //
11 // Copyright (C) 2002-2019, Lehigh University, Matthew Galati, Ted Ralphs //
12 // All Rights Reserved. //
13 //===========================================================================//
14 
15 //===========================================================================//
16 #ifndef DecompMemPool_h_
17 #define DecompMemPool_h_
18 
19 #include "CoinError.hpp"
20 
21 // --------------------------------------------------------------------- //
23 public:
24  double* dblArrNCoreCols;
25  double* dblArrNCoreRows;
26 
27 public:
28  void allocateMemory(const int nCoreCols,
29  const int nCoreRows) {
30  if (nCoreCols > 0) {
31  dblArrNCoreCols = new double[nCoreCols];
32  CoinAssertHint(dblArrNCoreCols, "Error: Out of Memory");
33  }
34 
35  if (nCoreRows > 0) {
36  dblArrNCoreRows = new double[nCoreRows];
37  CoinAssertHint(dblArrNCoreRows, "Error: Out of Memory");
38  }
39  }
40 
41 public:
43  dblArrNCoreCols(0),
44  dblArrNCoreRows(0) {
45  }
49  }
50 };
51 
52 #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:28
double * dblArrNCoreRows
Definition: DecompMemPool.h:25
double * dblArrNCoreCols
Definition: DecompMemPool.h:24