00001 //===========================================================================// 00002 // This file is part of the Decomp Solver Framework. // 00003 // // 00004 // Decomp is distributed under the Common Public License as part of the // 00005 // COIN-OR repository (http://www.coin-or.org). // 00006 // // 00007 // Author: Matthew Galati, Lehigh University // 00008 // // 00009 // Copyright (C) 2002-2015, Lehigh University, Matthew Galati, and Ted Ralphs// 00010 // All Rights Reserved. // 00011 //===========================================================================// 00012 00013 #ifndef MMKP_MEMPOOL_INCLUDED 00014 #define MMKP_MEMPOOL_INCLUDED 00015 00016 #include "CoinError.hpp" 00017 00018 // --------------------------------------------------------------------- // 00019 class MMKP_MemPool { 00020 public: 00021 double * dblArrNCoreCols; 00022 00023 public: 00024 void allocateMemory(const int nCoreCols) { 00025 00026 if(nCoreCols > 0){ 00027 //intArrNCoreCols = new int[nCoreCols]; 00028 dblArrNCoreCols = new double[nCoreCols]; 00029 //pIntDblArrNCoreCols = new pair<int,double>[nCoreCols]; 00030 //CoinAssertHint(intArrNCoreCols && 00031 // dblArrNCoreCols && 00032 // pIntDblArrNCoreCols, 00033 // "Error: Out of Memory"); 00034 } 00035 } 00036 00037 public: 00038 MMKP_MemPool() : 00039 dblArrNCoreCols(0) 00040 {} 00041 ~MMKP_MemPool() 00042 { 00043 UTIL_DELARR(dblArrNCoreCols); 00044 } 00045 }; 00046 00047 #endif