# BlisConstraint Class Reference

`#include <BlisConstraint.h>`

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

List of all members.

## Public Member Functions
| BlisConstraint ()
| Default constructor.
| BlisConstraint (int s, const int *ind, const double *val)
| Useful constructor.
| BlisConstraint (double lbh, double ubh, double lbs, double ubs)
| Useful constructor.
| BlisConstraint (double lbh, double ubh, double lbs, double ubs, int s, const int *ind, const double *val)
| Useful constructor.
virtual | ~BlisConstraint ()
| Destructor.
| BlisConstraint (const BlisConstraint &rhs)
| Copy constructor.
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded)
| Pack into a encode object.
virtual AlpsKnowledge * | decode (AlpsEncoded &encoded) const
| Decode a constraint from an encoded object.
virtual void | hashing (BcpsModel *model=NULL)
| Compute a hash key.
| BlisConstraint ()
| Default constructor.
| BlisConstraint (int s, const int *ind, const double *val)
| Useful constructor.
| BlisConstraint (double lbh, double ubh, double lbs, double ubs)
| Useful constructor.
| BlisConstraint (double lbh, double ubh, double lbs, double ubs, int size, const int *ind, const double *val)
| Useful constructor.
virtual | ~BlisConstraint ()
| Destructor.
| BlisConstraint (const BlisConstraint &rhs)
| Copy constructor.
OsiRowCut * | createOsiRowCut ()
| Create a OsiRowCut based on this constraint.
virtual void | hashing (BcpsModel *model=NULL)
| Compute a hash key.
double | violation (const double *lpSolution)
| Check if violates a given lp solution.
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded)
| Pack into a encode object.
virtual AlpsKnowledge * | decode (AlpsEncoded &encoded) const
| Decode a constraint from an encoded object.
int | getSize () const
| Return data.
int * | getIndices () const
| Return data.
double * | getValues () const
| Return data.
void | setData (int s, const int *ind, const double *val)
| Set data.
int | getSize () const
| Return data.
int * | getIndices () const
| Return data.
double * | getValues () const
| Return data.
void | setData (int s, const int *ind, const double *val)
| Set data.
## Protected Member Functions
AlpsReturnStatus | encodeBlis (AlpsEncoded *encoded)
| Pack Blis part into an encoded object.
AlpsReturnStatus | decodeBlis (AlpsEncoded &encoded)
| Unpack Blis part from a encode object.
AlpsReturnStatus | encodeBlis (AlpsEncoded *encoded)
| Pack Blis part into an encoded object.
AlpsReturnStatus | decodeBlis (AlpsEncoded &encoded)
| Unpack Blis part from a encode object.
## Private Attributes
int | size_
| Number of nonzero coefficients.
int * | indices_
| Variable indices.
double * | values_
| Value of nonzero coefficients.

## Detailed Description

Definition at line 31 of file BlisConstraint.h.

## Constructor & Destructor Documentation

BlisConstraint::BlisConstraint | ( |  | ) |

Default constructor.

BlisConstraint::BlisConstraint | ( | int | s,
|  | const int * | ind,
|  | const double * | val |
| ) |  |  |

Useful constructor.

BlisConstraint::BlisConstraint | ( | double | lbh,
|  | double | ubh,
|  | double | lbs,
|  | double | ubs |
| ) |  |  |

Useful constructor.

BlisConstraint::BlisConstraint | ( | double | lbh,
|  | double | ubh,
|  | double | lbs,
|  | double | ubs,
|  | int | s,
|  | const int * | ind,
|  | const double * | val |
| ) |  |  |

Useful constructor.

virtual BlisConstraint::~BlisConstraint | ( |  | ) | `[virtual]`

Destructor.

BlisConstraint::BlisConstraint | ( | const BlisConstraint & | rhs | ) |

Copy constructor.

BlisConstraint::BlisConstraint | ( |  | ) |

Default constructor.

BlisConstraint::BlisConstraint | ( | int | s,
|  | const int * | ind,
|  | const double * | val |
| ) |  |  |

Useful constructor.

BlisConstraint::BlisConstraint | ( | double | lbh,
|  | double | ubh,
|  | double | lbs,
|  | double | ubs |
| ) |  |  |

Useful constructor.

BlisConstraint::BlisConstraint | ( | double | lbh,
|  | double | ubh,
|  | double | lbs,
|  | double | ubs,
|  | int | size,
|  | const int * | ind,
|  | const double * | val |
| ) |  |  |

Useful constructor.

virtual BlisConstraint::~BlisConstraint | ( |  | ) | `[virtual]`

Destructor.

BlisConstraint::BlisConstraint | ( | const BlisConstraint & | rhs | ) |

Copy constructor.

## Member Function Documentation

int BlisConstraint::getSize | ( |  | ) | const`[inline]`

Return data.

Definition at line 61 of file BlisConstraint.h.

int* BlisConstraint::getIndices | ( |  | ) | const`[inline]`

Return data.

Definition at line 62 of file BlisConstraint.h.

double* BlisConstraint::getValues | ( |  | ) | const`[inline]`

Return data.

Definition at line 63 of file BlisConstraint.h.

void BlisConstraint::setData | ( | int | s,
|  | const int * | ind,
|  | const double * | val |
| ) |  |  | `[inline]`

Set data.

Definition at line 68 of file BlisConstraint.h.

AlpsReturnStatus BlisConstraint::encodeBlis | ( | AlpsEncoded * | encoded | ) | `[protected]`

Pack Blis part into an encoded object.

AlpsReturnStatus BlisConstraint::decodeBlis | ( | AlpsEncoded & | encoded | ) | `[protected]`

Unpack Blis part from a encode object.

virtual AlpsReturnStatus BlisConstraint::encode | ( | AlpsEncoded * | encoded | ) | `[virtual]`

Pack into a encode object.

Reimplemented from BcpsObject.

virtual AlpsKnowledge* BlisConstraint::decode | ( | AlpsEncoded & | encoded | ) | const`[virtual]`

Decode a constraint from an encoded object.

Reimplemented from BcpsObject.

virtual void BlisConstraint::hashing | ( | BcpsModel * | model = `NULL` | ) | `[virtual]`

Compute a hash key.

Reimplemented from BcpsObject.

int BlisConstraint::getSize | ( |  | ) | const`[inline]`

Return data.

Definition at line 65 of file BlisConstraint.h.

int* BlisConstraint::getIndices | ( |  | ) | const`[inline]`

Return data.

Definition at line 66 of file BlisConstraint.h.

double* BlisConstraint::getValues | ( |  | ) | const`[inline]`

Return data.

Definition at line 67 of file BlisConstraint.h.

void BlisConstraint::setData | ( | int | s,
|  | const int * | ind,
|  | const double * | val |
| ) |  |  | `[inline]`

Set data.

Definition at line 72 of file BlisConstraint.h.

AlpsReturnStatus BlisConstraint::encodeBlis | ( | AlpsEncoded * | encoded | ) | `[protected]`

Pack Blis part into an encoded object.

AlpsReturnStatus BlisConstraint::decodeBlis | ( | AlpsEncoded & | encoded | ) | `[protected]`

Unpack Blis part from a encode object.

OsiRowCut* BlisConstraint::createOsiRowCut | ( |  | ) |

Create a OsiRowCut based on this constraint.

virtual void BlisConstraint::hashing | ( | BcpsModel * | model = `NULL` | ) | `[virtual]`

Compute a hash key.

Reimplemented from BcpsObject.

double BlisConstraint::violation | ( | const double * | lpSolution | ) |

Check if violates a given lp solution.

virtual AlpsReturnStatus BlisConstraint::encode | ( | AlpsEncoded * | encoded | ) | `[virtual]`

Pack into a encode object.

Reimplemented from BcpsObject.

virtual AlpsKnowledge* BlisConstraint::decode | ( | AlpsEncoded & | encoded | ) | const`[virtual]`

Decode a constraint from an encoded object.

Reimplemented from BcpsObject.

## Member Data Documentation

int BlisConstraint::size_`[private]`

Number of nonzero coefficients.

Definition at line 35 of file BlisConstraint.h.

int * BlisConstraint::indices_`[private]`

Variable indices.

Definition at line 36 of file BlisConstraint.h.

double * BlisConstraint::values_`[private]`

Value of nonzero coefficients.

Definition at line 37 of file BlisConstraint.h.

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

- /home/coin/svn-release/Blis-0.93.10/Bcps/examples/Blis/BlisConstraint.h
- /home/coin/svn-release/Blis-0.93.10/Blis/src/BlisConstraint.h