00001 00002 // 00003 // Module : StableSetLPSolution.cpp 00004 // Description : LP solution to the current subproblem. 00005 // Author : Steffen Rebennack 00006 // Email : srebenac@ix.urz.uni-heidelberg.de; 00007 // steffen.rebennack@web.de 00008 // Copyright : (C) 2006 by the University of Heidelberg 00009 // Created on : Wed Apr 05 16:52:35 2006 00010 // Last modified by : - 00011 // Last modified on : - 00012 // Update count : 0 00013 // 00015 // 00016 // Date Name Changes/Extensions 00017 // ---- ---- ------------------ 00018 // 00020 00021 #include "StableSetLPSolution.hh" 00022 #include "Graph.hh" 00023 #include "StableSetMaster.hh" 00024 #include "StableSetSub.hh" 00025 00026 00027 00028 // ----------------------------------------------------------------------------- 00029 // C o n s t r u c t o r 00030 // ----------------------------------------------------------------------------- 00031 StableSetLPSolution::StableSetLPSolution (ABA_MASTER *master, ABA_SUB *sub, 00032 int numberOfNodes, double *xVal): 00033 ABA_LPSOLUTION<ABA_VARIABLE,ABA_CONSTRAINT> (master), 00034 m_sub(sub) 00035 { 00036 // Number of nodes. 00037 nVarCon_ = numberOfNodes; 00038 00039 // Initialize zVal_. 00040 zVal_.realloc(numberOfNodes); 00041 for (int i=0; i<nVarCon_; i++) { 00042 zVal_[i] = xVal[i]; 00043 } 00044 } 00045 00046 00047 // ----------------------------------------------------------------------------- 00048 // D e s t r u c t o r 00049 // ----------------------------------------------------------------------------- 00050 StableSetLPSolution::~StableSetLPSolution() { 00051 } 00052 00053 00054 // ----------------------------------------------------------------------------- 00055 // s t a b l e S e t M a s t e r 00056 // 00057 // Returns pointer of the master. 00058 // ----------------------------------------------------------------------------- 00059 StableSetMaster *StableSetLPSolution::stableSetMaster() const { 00060 return (StableSetMaster*)master_; 00061 } 00062 00063 00064 // ----------------------------------------------------------------------------- 00065 // s u b 00066 // 00067 // Return pointer to the current subproblem. 00068 // ----------------------------------------------------------------------------- 00069 ABA_SUB *StableSetLPSolution::sub() const { 00070 return (ABA_SUB*)m_sub; 00071 } 00072 00073 00074 00075 00076