Cgl 0.60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CglLandPTabRow.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005-2009, Pierre Bonami and others. All Rights Reserved.
2 // Author: Pierre Bonami
3 // LIF
4 // CNRS, Aix-Marseille Universites
5 // Date: 02/23/08
6 //
7 // $Id: CglLandPTabRow.hpp 1122 2013-04-06 20:39:53Z stefan $
8 //
9 // This code is licensed under the terms of the Eclipse Public License (EPL).
10 //---------------------------------------------------------------------------
11
12 #ifndef CglLandPTabRow_H
13 #define CglLandPTabRow_H
14
15 #include "CoinIndexedVector.hpp"
16 #include <iostream>
17
18 namespace LAP
19 {
20 class CglLandPSimplex;
21 struct TabRow: public CoinIndexedVector
22 {
24 int num;
26 double rhs;
28 const CglLandPSimplex * si_;
29
31 bool modularized_;
32
33 TabRow():
34 CoinIndexedVector(), si_(NULL), modularized_(false) {}
35
36 TabRow(const CglLandPSimplex *si):
37 CoinIndexedVector(), num(-1), rhs(0), si_(si), modularized_(false) {}
38
39 TabRow(const TabRow & source):CoinIndexedVector(source),
40 num(source.num), rhs(source.rhs), si_(source.si_)
41 {
42 }
43
44 TabRow& operator=(const TabRow & r)
45 {
46 if (this != &r)
47 {
48 CoinIndexedVector::operator=(r);
49 num = r.num;
50 rhs = r.rhs;
51 si_ = r.si_;
52 }
53 return *this;
54 }
55
56 bool operator==(const TabRow &r) const;
57 ~TabRow()
58 {
59 }
60
61 void modularize(const bool * integerVar);
62
63 void print(std::ostream & os, int width = 9, const int * nonBasics = NULL,
64 int m = 0);
65 inline
66 const double& operator[](const int &index) const
67 {
68 return denseVector()[index];
69 }
70
71 inline
72 double& operator[](const int &index)
73 {
74 return denseVector()[index];
75 }
76 };
77 }/* Ends LAP Namespace.*/
78
79 #endif
80
LAP::TabRow::modularize
void modularize(const bool *integerVar)
LAP::TabRow::rhs
double rhs
Row right-hand-side.
Definition: CglLandPTabRow.hpp:26
LAP::TabRow::num
int num
Row number.
Definition: CglLandPTabRow.hpp:24
LAP::TabRow::TabRow
TabRow(const TabRow &source)
Definition: CglLandPTabRow.hpp:39
LAP::TabRow::operator=
TabRow & operator=(const TabRow &r)
Definition: CglLandPTabRow.hpp:44
CoinIndexedVector::print
void print() const
Print out.
LAP::TabRow
Definition: CglLandPTabRow.hpp:21
LAP::TabRow::operator[]
double & operator[](const int &index)
Definition: CglLandPTabRow.hpp:72
CoinIndexedVector::denseVector
double * denseVector() const
Get the vector as a dense vector.
Definition: CoinIndexedVector.hpp:121
LAP::TabRow::operator==
bool operator==(const TabRow &r) const
LAP::TabRow::~TabRow
~TabRow()
Definition: CglLandPTabRow.hpp:57
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
LAP::CglLandPSimplex
Definition: CglLandPSimplex.hpp:42
LAP::TabRow::TabRow
TabRow()
Definition: CglLandPTabRow.hpp:33
LAP::TabRow::modularized_
bool modularized_
Flag to say if row is modularized.
Definition: CglLandPTabRow.hpp:31
LAP::TabRow::operator[]
const double & operator[](const int &index) const
Definition: CglLandPTabRow.hpp:66
LAP::TabRow::TabRow
TabRow(const CglLandPSimplex *si)
Definition: CglLandPTabRow.hpp:36
CoinIndexedVector.hpp
LAP::TabRow::si_
const CglLandPSimplex * si_
Row of what?
Definition: CglLandPTabRow.hpp:28
CoinIndexedVector::operator=
CoinIndexedVector & operator=(const CoinIndexedVector &)
Assignment operator.