Cbc  2.9.9
 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;
29 
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  {
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;
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 
void modularize(const bool *integerVar)
double rhs
Row right-hand-side.
int num
Row number.
TabRow(const TabRow &source)
TabRow & operator=(const TabRow &r)
void print() const
Print out.
double & operator[](const int &index)
double * denseVector() const
Get the vector as a dense vector.
bool operator==(const TabRow &r) const
Indexed Vector.
bool modularized_
Flag to say if row is modularized.
const double & operator[](const int &index) const
TabRow(const CglLandPSimplex *si)
const CglLandPSimplex * si_
Row of what?
CoinIndexedVector & operator=(const CoinIndexedVector &)
Assignment operator.