Osi 0.107.7

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Friends | List of all members
OsiColCut Class Reference

Column Cut Class. More...

`#include <OsiColCut.hpp>`

Inheritance diagram for OsiColCut:
[legend]
Collaboration diagram for OsiColCut:
[legend]

## Public Member Functions
Setting column bounds
void | setLbs (int nElements, const int *colIndices, const double *lbElements)
| Set column lower bounds. More...
void | setLbs (const CoinPackedVector &lbs)
| Set column lower bounds from a packed vector. More...
void | setUbs (int nElements, const int *colIndices, const double *ubElements)
| Set column upper bounds. More...
void | setUbs (const CoinPackedVector &ubs)
| Set column upper bounds from a packed vector. More...
Getting column bounds
const CoinPackedVector & | lbs () const
| Get column lower bounds. More...
const CoinPackedVector & | ubs () const
| Get column upper bounds. More...
Comparison operators
virtual bool | operator== (const OsiColCut &rhs) const
    equal - true if lower bounds, upper bounds,
and OsiCut are equal. More...
virtual bool | operator!= (const OsiColCut &rhs) const
| not equal More...
Sanity checks on cut
virtual bool | consistent () const
| Returns true if the cut is consistent with respect to itself. More...
virtual bool | consistent (const OsiSolverInterface &im) const
    Returns true if cut is consistent with respect to the solver
interface's model. More...
virtual bool | infeasible (const OsiSolverInterface &im) const
    Returns true if the cut is infeasible with respect to its bounds and the
column bounds in the solver interface's models. More...
virtual double | violated (const double *solution) const
| Returns infeasibility of the cut with respect to solution passed in i.e. More...
Constructors and destructors
OsiColCut & | operator= (const OsiColCut &rhs)
| Assignment operator. More...
| OsiColCut (const OsiColCut &)
| Copy constructor. More...
| OsiColCut ()
| Default Constructor. More...
virtual OsiColCut * | clone () const
| Clone. More...
virtual | ~OsiColCut ()
| Destructor. More...
Debug stuff
virtual void | print () const
| Print cuts in collection. More...
Public Member Functions inherited from OsiCut
void | setEffectiveness (double e)
| Set effectiveness. More...
double | effectiveness () const
| Get effectiveness. More...
void | setGloballyValid (bool trueFalse)
| Set globallyValid (nonzero true) More...
void | setGloballyValid ()
void | setNotGloballyValid ()
bool | globallyValid () const
| Get globallyValid. More...
void | setGloballyValidAsInteger (int trueFalse)
| Set globallyValid as integer (nonzero true) More...
int | globallyValidAsInteger () const
| Get globallyValid. More...
virtual bool | operator== (const OsiCut &rhs) const
| equal. 2 cuts are equal if there effectiveness are equal More...
virtual bool | operator!= (const OsiCut &rhs) const
| not equal More...
virtual bool | operator< (const OsiCut &rhs) const
| less than. True if this.effectiveness < rhs.effectiveness More...
virtual bool | operator> (const OsiCut &rhs) const
| less than. True if this.effectiveness > rhs.effectiveness More...

## Private Attributes
Private member data
CoinPackedVector | lbs_
| Lower bounds. More...
CoinPackedVector | ubs_
| Upper bounds. More...

## Friends
void | OsiColCutUnitTest (const OsiSolverInterface *baseSiP, const std::string &mpsDir)
| A function that tests the methods in the OsiColCut class. More...

## Additional Inherited Members
Protected Member Functions inherited from OsiCut
| OsiCut ()
| Default Constructor. More...
| OsiCut (const OsiCut &)
| Copy constructor. More...
OsiCut & | operator= (const OsiCut &rhs)
| Assignment operator. More...
virtual | ~OsiCut ()
| Destructor. More...

## Detailed Description

Column Cut Class.

Column Cut Class has:

- a sparse vector of column lower bounds
- a sparse vector of column upper bounds

Definition at line 23 of file OsiColCut.hpp.

## Constructor & Destructor Documentation

OsiColCut::OsiColCut | ( | const OsiColCut & |  | ) |

Copy constructor.

OsiColCut::OsiColCut | ( |  | ) |

Default Constructor.

virtual OsiColCut::~OsiColCut | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

void OsiColCut::setLbs | ( | int | nElements,
|  | const int * | colIndices,
|  | const double * | lbElements
| ) |  |
| inline

Set column lower bounds.

Definition at line 161 of file OsiColCut.hpp.

void OsiColCut::setLbs | ( | const CoinPackedVector & | lbs | ) |
| inline

Set column lower bounds from a packed vector.

Definition at line 177 of file OsiColCut.hpp.

void OsiColCut::setUbs | ( | int | nElements,
|  | const int * | colIndices,
|  | const double * | ubElements
| ) |  |
| inline

Set column upper bounds.

Definition at line 169 of file OsiColCut.hpp.

void OsiColCut::setUbs | ( | const CoinPackedVector & | ubs | ) |
| inline

Set column upper bounds from a packed vector.

Definition at line 182 of file OsiColCut.hpp.

const CoinPackedVector & OsiColCut::lbs | ( |  | ) | const
| inline

Get column lower bounds.

Definition at line 190 of file OsiColCut.hpp.

const CoinPackedVector & OsiColCut::ubs | ( |  | ) | const
| inline

Get column upper bounds.

Definition at line 195 of file OsiColCut.hpp.

bool OsiColCut::operator== | ( | const OsiColCut & | rhs | ) | const
| inline virtual

    equal - true if lower bounds, upper bounds,

and OsiCut are equal.

Definition at line 204 of file OsiColCut.hpp.

bool OsiColCut::operator!= | ( | const OsiColCut & | rhs | ) | const
| inline virtual

not equal

Definition at line 217 of file OsiColCut.hpp.

bool OsiColCut::consistent | ( |  | ) | const
| inline virtual

Returns true if the cut is consistent with respect to itself.

This checks to ensure that:

- The bound vectors do not have duplicate indices,
- The bound vectors indices are >=0

Implements OsiCut.

Definition at line 226 of file OsiColCut.hpp.

bool OsiColCut::consistent | ( | const OsiSolverInterface & | im | ) | const
| inline virtual

    Returns true if cut is consistent with respect to the solver

interface's model.

This checks to ensure that the lower & upperbound packed vectors:

- do not have an index >= the number of column is the model.

Implements OsiCut.

Definition at line 239 of file OsiColCut.hpp.

bool OsiColCut::infeasible | ( | const OsiSolverInterface & | im | ) | const
| inline virtual

    Returns true if the cut is infeasible with respect to its bounds and the

column bounds in the solver interface's models.

This checks whether:

- the maximum of the new and existing lower bounds is strictly greater than the minimum of the new and existing upper bounds.

Implements OsiCut.

Definition at line 290 of file OsiColCut.hpp.

virtual double OsiColCut::violated | ( | const double * | solution | ) | const
| virtual

Returns infeasibility of the cut with respect to solution passed in i.e.

is positive if cuts off that solution. solution is getNumCols() long..

Implements OsiCut.

OsiColCut& OsiColCut::operator= | ( | const OsiColCut & | rhs | ) |

Assignment operator.

virtual OsiColCut* OsiColCut::clone | ( |  | ) | const
| virtual

Clone.

virtual void OsiColCut::print | ( |  | ) | const
| virtual

Print cuts in collection.

Reimplemented from OsiCut.

## Friends And Related Function Documentation

void OsiColCutUnitTest | ( | const OsiSolverInterface * | baseSiP,
|  | const std::string & | mpsDir
| ) |  |
| friend

A function that tests the methods in the OsiColCut class.

## Member Data Documentation

CoinPackedVector OsiColCut::lbs_
| private

Lower bounds.

Definition at line 149 of file OsiColCut.hpp.

CoinPackedVector OsiColCut::ubs_
| private

Upper bounds.

Definition at line 151 of file OsiColCut.hpp.

The documentation for this class was generated from the following file:

- /tmp/Osi-0.107.7/Osi/src/Osi/OsiColCut.hpp