Cgl
trunk
|
00001 // Copyright (C) 2005-2009, Pierre Bonami and others. All Rights Reserved. 00002 // Author: Pierre Bonami 00003 // LIF 00004 // CNRS, Aix-Marseille Universites 00005 // Date: 02/23/08 00006 // 00007 // $Id$ 00008 // 00009 // This code is licensed under the terms of the Eclipse Public License (EPL). 00010 //--------------------------------------------------------------------------- 00011 00012 #ifndef CglLandPTabRow_H 00013 #define CglLandPTabRow_H 00014 00015 #include "CoinIndexedVector.hpp" 00016 #include <iostream> 00017 00018 namespace LAP 00019 { 00020 class CglLandPSimplex; 00021 struct TabRow: public CoinIndexedVector 00022 { 00024 int num; 00026 double rhs; 00028 const CglLandPSimplex * si_; 00029 00031 bool modularized_; 00032 00033 TabRow(): 00034 CoinIndexedVector(), si_(NULL), modularized_(false) {} 00035 00036 TabRow(const CglLandPSimplex *si): 00037 CoinIndexedVector(), num(-1), rhs(0), si_(si), modularized_(false) {} 00038 00039 TabRow(const TabRow & source):CoinIndexedVector(source), 00040 num(source.num), rhs(source.rhs), si_(source.si_) 00041 { 00042 } 00043 00044 TabRow& operator=(const TabRow & r) 00045 { 00046 if (this != &r) 00047 { 00048 CoinIndexedVector::operator=(r); 00049 num = r.num; 00050 rhs = r.rhs; 00051 si_ = r.si_; 00052 } 00053 return *this; 00054 } 00055 00056 bool operator==(const TabRow &r) const; 00057 ~TabRow() 00058 { 00059 } 00060 00061 void modularize(const bool * integerVar); 00062 00063 void print(std::ostream & os, int width = 9, const int * nonBasics = NULL, 00064 int m = 0); 00065 inline 00066 const double& operator[](const int &index) const 00067 { 00068 return denseVector()[index]; 00069 } 00070 00071 inline 00072 double& operator[](const int &index) 00073 { 00074 return denseVector()[index]; 00075 } 00076 }; 00077 }/* Ends LAP Namespace.*/ 00078 00079 #endif 00080