DecompWaitingCol.h

Go to the documentation of this file.
00001 //===========================================================================//
00002 // This file is part of the DIP Solver Framework.                            //
00003 //                                                                           //
00004 // DIP is distributed under the Eclipse Public License as part of the        //
00005 // COIN-OR repository (http://www.coin-or.org).                              //
00006 //                                                                           //
00007 // Author: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com)       //
00008 //                                                                           //
00009 // Conceptual Design: Matthew Galati, SAS Institute Inc.                     //
00010 //                    Ted Ralphs, Lehigh University                          //
00011 //                                                                           //
00012 // Copyright (C) 2002-2013, Lehigh University, Matthew Galati, Ted Ralphs    //
00013 // All Rights Reserved.                                                      //
00014 //===========================================================================//
00015 
00016 #ifndef DECOMP_WAITING_COL_INCLUDE
00017 #define DECOMP_WAITING_COL_INCLUDE
00018 
00019 #include "Decomp.h"
00020 #include "DecompVar.h"
00021 #include "UtilMacros.h"
00022 
00023 // ---------------------------------------------------------------------- //
00024 class DecompWaitingCol {
00025 
00026 private:
00027    DecompVar*         m_var;  //s        the variable
00028    CoinPackedVector* m_col;   //(A'' s)  the column
00029 
00030 public:
00031    inline DecompVar*         getVarPtr() const {
00032       return m_var;
00033    }
00034    inline CoinPackedVector* getColPtr() const {
00035       return m_col;
00036    }
00037    inline const double getReducedCost() const  {
00038       return m_var->getReducedCost();
00039    }
00040    inline const double getLowerBound() const   {
00041       return m_var->getLowerBound();
00042    }
00043    inline const double getUpperBound() const   {
00044       return m_var->getUpperBound();
00045    }
00046    inline const double getOrigCost() const     {
00047       return m_var->getOriginalCost();
00048    }
00049 
00050    inline void   deleteCol() {
00051       UTIL_DELPTR(m_col);
00052    }
00053    inline void   deleteVar() {
00054       UTIL_DELPTR(m_var);
00055    }
00056    inline void   clearVar()  {
00057       m_var = 0;
00058    }
00059    inline void   setCol(CoinPackedVector* col) {
00060       m_col = col;
00061    }
00062 
00063    bool setReducedCost(const double*       u,
00064                        const DecompStatus    stat);
00065 
00066 public:
00067    DecompWaitingCol(const DecompWaitingCol& rhs) {
00068       m_var = rhs.m_var;
00069       m_col = rhs.m_col;
00070    }
00071    DecompWaitingCol(DecompVar* var, CoinPackedVector* col) :
00072       m_var(var),
00073       m_col(col) {}
00074 
00075    ~DecompWaitingCol() {}
00076 };
00077 
00078 #endif

Generated on 12 Feb 2015 for Dip-All by  doxygen 1.6.1