00001
00002
00003
00004
00005
00006
00007
00008 #ifndef CglLandPTabRow_H
00009 #define CglLandPTabRow_H
00010
00011 #include "CoinIndexedVector.hpp"
00012 #include <iostream>
00013
00014 namespace LAP
00015 {
00016 class CglLandPSimplex;
00017 struct TabRow: public CoinIndexedVector
00018 {
00020 int num;
00022 double rhs;
00024 const CglLandPSimplex * si_;
00025
00027 bool modularized_;
00028
00029 TabRow():
00030 CoinIndexedVector(), si_(NULL), modularized_(false) {}
00031
00032 TabRow(const CglLandPSimplex *si):
00033 CoinIndexedVector(), num(-1), rhs(0), si_(si), modularized_(false) {}
00034
00035 TabRow(const TabRow & source):CoinIndexedVector(source),
00036 num(source.num), rhs(source.rhs), si_(source.si_)
00037 {
00038 }
00039
00040 TabRow& operator=(const TabRow & r)
00041 {
00042 if (this != &r)
00043 {
00044 CoinIndexedVector::operator=(r);
00045 num = r.num;
00046 rhs = r.rhs;
00047 si_ = r.si_;
00048 }
00049 return *this;
00050 }
00051
00052 bool operator==(const TabRow &r) const;
00053 ~TabRow()
00054 {
00055 }
00056
00057 void modularize(const bool * integerVar);
00058
00059 void print(std::ostream & os, int width = 9, const int * nonBasics = NULL,
00060 int m = 0);
00061 inline
00062 const double& operator[](const int &index) const
00063 {
00064 return denseVector()[index];
00065 }
00066
00067 inline
00068 double& operator[](const int &index)
00069 {
00070 return denseVector()[index];
00071 }
00072 };
00073 }
00074
00075 #endif
00076