Loading...
Searching...
No Matches
CglLandPTabRow.hpp
Go to the documentation of this file.
// Copyright (C) 2005-2009, Pierre Bonami and others. All Rights Reserved.
// Author: Pierre Bonami
// LIF
// CNRS, Aix-Marseille Universites
// Date: 02/23/08
//
// $Id$
//
// This code is licensed under the terms of the Eclipse Public License (EPL).
//---------------------------------------------------------------------------
#ifndef CglLandPTabRow_H
#define CglLandPTabRow_H
#include "CoinIndexedVector.hpp"
#include <iostream>
namespace LAP
{
class CglLandPSimplex;
struct TabRow: public CoinIndexedVector
{
int num;
double rhs;
const CglLandPSimplex * si_;
bool modularized_;
TabRow():
CoinIndexedVector(), si_(NULL), modularized_(false) {}
TabRow(const CglLandPSimplex *si):
CoinIndexedVector(), num(-1), rhs(0), si_(si), modularized_(false) {}
TabRow(const TabRow & source):CoinIndexedVector(source),
num(source.num), rhs(source.rhs), si_(source.si_)
{
}
TabRow& operator=(const TabRow & r)
{
if (this != &r)
{
CoinIndexedVector::operator=(r);
num = r.num;
rhs = r.rhs;
si_ = r.si_;
}
return *this;
}
bool operator==(const TabRow &r) const;
~TabRow()
{
}
void modularize(const bool * integerVar);
void print(std::ostream & os, int width = 9, const int * nonBasics = NULL,
int m = 0);
inline
const double& operator[](const int &index) const
{
return denseVector()[index];
}
inline
double& operator[](const int &index)
{
return denseVector()[index];
}
};
}/* Ends LAP Namespace.*/
#endif
LAP::CglLandPSimplex
Definition CglLandPSimplex.hpp:43
LAP
Performs one round of Lift & Project using CglLandPSimplex to build cuts.
Definition CglLandP.hpp:25
LAP::TabRow::modularized_
bool modularized_
Flag to say if row is modularized.
Definition CglLandPTabRow.hpp:31
LAP::TabRow::~TabRow
~TabRow()
Definition CglLandPTabRow.hpp:57
LAP::TabRow::si_
const CglLandPSimplex * si_
Row of what?
Definition CglLandPTabRow.hpp:28
LAP::TabRow::operator==
bool operator==(const TabRow &r) const
LAP::TabRow::rhs
double rhs
Row right-hand-side.
Definition CglLandPTabRow.hpp:26
LAP::TabRow::operator[]
const double & operator[](const int &index) const
Definition CglLandPTabRow.hpp:66
LAP::TabRow::modularize
void modularize(const bool *integerVar)
LAP::TabRow::operator=
TabRow & operator=(const TabRow &r)
Definition CglLandPTabRow.hpp:44
LAP::TabRow::operator[]
double & operator[](const int &index)
Definition CglLandPTabRow.hpp:72
LAP::TabRow::num
int num
Row number.
Definition CglLandPTabRow.hpp:24
LAP::TabRow::print
void print(std::ostream &os, int width=9, const int *nonBasics=NULL, int m=0)
LAP::TabRow::TabRow
TabRow(const CglLandPSimplex *si)
Definition CglLandPTabRow.hpp:36
LAP::TabRow::TabRow
TabRow()
Definition CglLandPTabRow.hpp:33
LAP::TabRow::TabRow
TabRow(const TabRow &source)
Definition CglLandPTabRow.hpp:39