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

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# BcpsSolution Class Reference

This class holds the solution objects. More...

`#include <BcpsSolution.h>`

Inheritance diagram for BcpsSolution:

[legend]
Collaboration diagram for BcpsSolution:

[legend]
List of all members.

## Public Member Functions
| BcpsSolution ()
| Default constructor.
| BcpsSolution (int size, const double *values, double q)
| Useful constructor.
| BcpsSolution (int size, BcpsObject_p *&objects, double *&values, double q)
| Construct an object using the given arrays.
virtual | ~BcpsSolution ()
| Distructor.
virtual void | print (std::ostream &os) const
| Print out the solution.
AlpsReturnStatus | encodeBcps (AlpsEncoded *encoded) const
| Pack Bcps part of solution into an encoded objects.
AlpsReturnStatus | decodeBcps (AlpsEncoded &encoded)
| Unpack Bcps part of solution from an encoded objects.
int | getSize () const
| Get the appropriate data member.
const BcpsObject_p * | getObjects () const
| Get the appropriate data member.
const double * | getValues () const
| Get the appropriate data member.
double | getQuality () const
| Get the appropriate data member.
void | setSize (int s)
| Set/assign the appropriate data member.
void | assignObjects (BcpsObject_p *&obj)
| Set/assign the appropriate data member.
void | setValues (const double *vs, int s)
| Set/assign the appropriate data member.
void | setQuality (double q)
| Set/assign the appropriate data member.
virtual BcpsSolution * | selectNonzeros (const double etol=1e-5) const
| Select the fractional/nonzero elements from the solution array and return a new object in compacted form.
virtual BcpsSolution * | selectFractional (const double etol=1e-5) const
| Select the fractional/nonzero elements from the solution array and return a new object in compacted form.
## Protected Attributes
int | size_
| Size of values_.
BcpsObject_p * | objects_
| List of objects associated with values.
double * | values_
| Solution values.
double | quality_
| Quality/Objective value associated with this solution.
## Private Member Functions
| BcpsSolution (const BcpsSolution &)
BcpsSolution & | operator= (const BcpsSolution &)

## Detailed Description

This class holds the solution objects.

At this level, a solution is just considered to be a list of objects with associated values.

Definition at line 34 of file BcpsSolution.h.

## Constructor & Destructor Documentation

BcpsSolution::BcpsSolution | ( | const BcpsSolution & |  | ) | `[private]`

BcpsSolution::BcpsSolution | ( |  | ) | `[inline]`

Default constructor.

Definition at line 58 of file BcpsSolution.h.

BcpsSolution::BcpsSolution | ( | int | size,
|  | const double * | values,
|  | double | q |
| ) |  |  | `[inline]`

Useful constructor.

Definition at line 64 of file BcpsSolution.h.

References values_.

BcpsSolution::BcpsSolution | ( | int | size,
|  | BcpsObject_p *& | objects,
|  | double *& | values,
|  | double | q |
| ) |  |  | `[inline]`

Construct an object using the given arrays.

Note that the new objects takes over the pointers and NULLs them out in the calling method.

Definition at line 80 of file BcpsSolution.h.

virtual BcpsSolution::~BcpsSolution | ( |  | ) | `[inline, virtual]`

Distructor.

Definition at line 88 of file BcpsSolution.h.

References objects_, size_, and values_.

## Member Function Documentation

BcpsSolution& BcpsSolution::operator= | ( | const BcpsSolution & |  | ) | `[private]`

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

Get the appropriate data member.

Definition at line 100 of file BcpsSolution.h.

References size_.

const BcpsObject_p* BcpsSolution::getObjects | ( |  | ) | const`[inline]`

Get the appropriate data member.

Definition at line 101 of file BcpsSolution.h.

References objects_.

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

Get the appropriate data member.

Definition at line 102 of file BcpsSolution.h.

References values_.

double BcpsSolution::getQuality | ( |  | ) | const`[inline]`

Get the appropriate data member.

Definition at line 103 of file BcpsSolution.h.

References quality_.

void BcpsSolution::setSize | ( | int | s | ) | `[inline]`

Set/assign the appropriate data member.

Definition at line 108 of file BcpsSolution.h.

References size_.

void BcpsSolution::assignObjects | ( | BcpsObject_p *& | obj | ) | `[inline]`

Set/assign the appropriate data member.

Definition at line 109 of file BcpsSolution.h.

References objects_.

void BcpsSolution::setValues | ( | const double * | vs,
|  | int | s |
| ) |  |  | `[inline]`

Set/assign the appropriate data member.

Definition at line 113 of file BcpsSolution.h.

References size_, and values_.

void BcpsSolution::setQuality | ( | double | q | ) | `[inline]`

Set/assign the appropriate data member.

Definition at line 119 of file BcpsSolution.h.

References quality_.

virtual BcpsSolution* BcpsSolution::selectNonzeros | ( | const double | etol = `1e-5` | ) | const`[virtual]`

Select the fractional/nonzero elements from the solution array and return a new object in compacted form.

virtual BcpsSolution* BcpsSolution::selectFractional | ( | const double | etol = `1e-5` | ) | const`[virtual]`

Select the fractional/nonzero elements from the solution array and return a new object in compacted form.

virtual void BcpsSolution::print | ( | std::ostream & | os | ) | const`[inline, virtual]`

Print out the solution.

Reimplemented from AlpsSolution.

Reimplemented in VrpSolution, and BlisSolution.

Definition at line 130 of file BcpsSolution.h.

References size_, and values_.

AlpsReturnStatus BcpsSolution::encodeBcps | ( | AlpsEncoded * | encoded | ) | const

Pack Bcps part of solution into an encoded objects.

Referenced by VrpSolution::encode(), and BlisSolution::encode().

AlpsReturnStatus BcpsSolution::decodeBcps | ( | AlpsEncoded & | encoded | ) |

Unpack Bcps part of solution from an encoded objects.

Referenced by VrpSolution::decode(), and BlisSolution::decode().

## Member Data Documentation

int BcpsSolution::size_`[protected]`

Size of values_.

Definition at line 44 of file BcpsSolution.h.

Referenced by getSize(), print(), BlisSolution::print(), setSize(), setValues(), and ~BcpsSolution().

BcpsObject_p* BcpsSolution::objects_`[protected]`

List of objects associated with values.

Can be NULL.

Definition at line 47 of file BcpsSolution.h.

Referenced by assignObjects(), getObjects(), and ~BcpsSolution().

double* BcpsSolution::values_`[protected]`

Solution values.

Definition at line 50 of file BcpsSolution.h.

Referenced by BcpsSolution(), getValues(), print(), BlisSolution::print(), setValues(), and ~BcpsSolution().

double BcpsSolution::quality_`[protected]`

Quality/Objective value associated with this solution.

Definition at line 53 of file BcpsSolution.h.

Referenced by getQuality(), and setQuality().

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

- /home/coin/SVN-release/Blis-0.92.0/Bcps/src/BcpsSolution.h