Alps  2.0.2
Public Member Functions | Private Attributes | List of all members
AbcSolution Class Reference

This class holds a MIP feasible primal solution. More...

#include <AbcSolution.h>

+ Inheritance diagram for AbcSolution:
+ Collaboration diagram for AbcSolution:

Public Member Functions

 AbcSolution ()
 
 AbcSolution (const int s, const double *val, const double obj)
 
 ~AbcSolution ()
 
double getObjValue () const
 Get the objective value value. More...
 
void setObj (double obj)
 
void setValue (int size, double const *value)
 
virtual double getQuality () const
 
int getSize () const
 Get the size of the solution. More...
 
const double * getColSolution () const
 Get the column solution. More...
 
double getColSolution (int i) const
 Get item i in the solution vector. More...
 
virtual void print (std::ostream &os) const
 Print out the solution. More...
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded) const
 The method that encodes the solution into a encoded object. More...
 
virtual AlpsReturnStatus decodeToSelf (AlpsEncoded &encoded)
 Decode the given AlpsEncoded object into this. More...
 
virtual AlpsKnowledgedecode (AlpsEncoded &) const
 The method that decodes the solution from a encoded object. More...
 
 AbcSolution ()
 
 AbcSolution (const int s, const double *val, const double obj)
 
 ~AbcSolution ()
 
double getObjValue () const
 Get the objective value value. More...
 
void setObj (double obj)
 
void setValue (int size, double const *value)
 
virtual double getQuality () const
 
int getSize () const
 Get the size of the solution. More...
 
const double * getColSolution () const
 Get the column solution. More...
 
double getColSolution (int i) const
 Get item i in the solution vector. More...
 
virtual void print (std::ostream &os) const
 Print out the solution. More...
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded) const
 The method that encodes the solution into a encoded object. More...
 
virtual AlpsReturnStatus decodeToSelf (AlpsEncoded &encoded)
 Decode the given AlpsEncoded object into this. More...
 
virtual AlpsKnowledgedecode (AlpsEncoded &) const
 The method that decodes the solution from a encoded object. More...
 
 AbcSolution ()
 
 AbcSolution (const int s, const double *val, const double obj)
 
 ~AbcSolution ()
 
double getObjValue () const
 Get the objective value value. More...
 
void setObj (double obj)
 
void setValue (int size, double const *value)
 
virtual double getQuality () const
 
int getSize () const
 Get the size of the solution. More...
 
const double * getColSolution () const
 Get the column solution. More...
 
double getColSolution (int i) const
 Get item i in the solution vector. More...
 
virtual void print (std::ostream &os) const
 Print out the solution. More...
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded) const
 The method that encodes the solution into a encoded object. More...
 
virtual AlpsReturnStatus decodeToSelf (AlpsEncoded &encoded)
 Decode the given AlpsEncoded object into this. More...
 
virtual AlpsKnowledgedecode (AlpsEncoded &) const
 The method that decodes the solution from a encoded object. More...
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded) const
 Encode this into the given AlpsEncoded object. More...
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded) const
 Encode this into the given AlpsEncoded object. More...
 
AlpsEncodedencode () const
 Get encode defined in AlpsKnowledge. More...
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded) const
 Get encode defined in AlpsKnowledge. More...
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded) const
 Encode this into the given AlpsEncoded object. More...
 
AlpsEncodedencode () const
 Get encode defined in AlpsKnowledge. More...
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded) const
 Get encode defined in AlpsKnowledge. More...
 
- Public Member Functions inherited from AlpsSolution
 AlpsSolution ()
 Default constructor. More...
 
 AlpsSolution (const AlpsNodeIndex_t i, const int d)
 Constructor to set index and depth. More...
 
virtual ~AlpsSolution ()
 Destructor. More...
 
AlpsNodeIndex_t getIndex ()
 Get index where solution was found. More...
 
void setIndex (const AlpsNodeIndex_t i)
 Set index where solution was found. More...
 
int getDepth ()
 Get depth where solution was found. More...
 
void setDepth (const int d)
 Set depth where solution was found. More...
 
AlpsEncodedencode () const
 Get encode defined in AlpsKnowledge. More...
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded) const
 Get encode defined in AlpsKnowledge. More...
 
- Public Member Functions inherited from AlpsKnowledge
 AlpsKnowledge ()
 Default constructor. More...
 
 AlpsKnowledge (AlpsKnowledgeType type)
 
 AlpsKnowledge (AlpsKnowledgeType type, AlpsKnowledgeBroker *broker)
 
virtual ~AlpsKnowledge ()
 Destructor. More...
 
AlpsKnowledgeType getType () const
 Get knowledge type. More...
 
void setType (AlpsKnowledgeType t)
 Set knowledge type. More...
 
AlpsKnowledgeBrokerbroker ()
 Get pointer to the knowledge broker. More...
 
const AlpsKnowledgeBrokerbroker () const
 Get pointer to the knowledge broker. More...
 
void setBroker (AlpsKnowledgeBroker *broker)
 Set knowledge broker. More...
 
AlpsEncodedencode () const
 Encode the content of this into an AlpsEncoded object and return a pointer to it. More...
 

Private Attributes

int size_
 
double * value_
 
double objective_
 

Additional Inherited Members

- Public Attributes inherited from AlpsKnowledge
AlpsKnowledgeBrokerbroker_
 

Detailed Description

This class holds a MIP feasible primal solution.

Definition at line 37 of file AbcSolution.h.

Constructor & Destructor Documentation

◆ AbcSolution() [1/6]

AbcSolution::AbcSolution ( )
inline

Definition at line 44 of file AbcSolution.h.

◆ AbcSolution() [2/6]

AbcSolution::AbcSolution ( const int  s,
const double *  val,
const double  obj 
)
inline

Definition at line 50 of file AbcSolution.h.

◆ ~AbcSolution() [1/3]

AbcSolution::~AbcSolution ( )
inline

Definition at line 60 of file AbcSolution.h.

◆ AbcSolution() [3/6]

AbcSolution::AbcSolution ( )
inline

Definition at line 44 of file AbcSolution.h.

◆ AbcSolution() [4/6]

AbcSolution::AbcSolution ( const int  s,
const double *  val,
const double  obj 
)
inline

Definition at line 50 of file AbcSolution.h.

◆ ~AbcSolution() [2/3]

AbcSolution::~AbcSolution ( )
inline

Definition at line 60 of file AbcSolution.h.

◆ AbcSolution() [5/6]

AbcSolution::AbcSolution ( )
inline

Definition at line 44 of file AbcSolution.h.

◆ AbcSolution() [6/6]

AbcSolution::AbcSolution ( const int  s,
const double *  val,
const double  obj 
)
inline

Definition at line 50 of file AbcSolution.h.

◆ ~AbcSolution() [3/3]

AbcSolution::~AbcSolution ( )
inline

Definition at line 60 of file AbcSolution.h.

Member Function Documentation

◆ getObjValue() [1/3]

double AbcSolution::getObjValue ( ) const
inline

Get the objective value value.

Definition at line 68 of file AbcSolution.h.

◆ setObj() [1/3]

void AbcSolution::setObj ( double  obj)
inline

Definition at line 70 of file AbcSolution.h.

◆ setValue() [1/3]

void AbcSolution::setValue ( int  size,
double const *  value 
)
inline

Definition at line 72 of file AbcSolution.h.

◆ getQuality() [1/3]

virtual double AbcSolution::getQuality ( ) const
inlinevirtual

Definition at line 81 of file AbcSolution.h.

◆ getSize() [1/3]

int AbcSolution::getSize ( ) const
inline

Get the size of the solution.

Definition at line 84 of file AbcSolution.h.

◆ getColSolution() [1/6]

const double* AbcSolution::getColSolution ( ) const
inline

Get the column solution.

Definition at line 87 of file AbcSolution.h.

◆ getColSolution() [2/6]

double AbcSolution::getColSolution ( int  i) const
inline

Get item i in the solution vector.

Definition at line 91 of file AbcSolution.h.

◆ print() [1/3]

virtual void AbcSolution::print ( std::ostream &  os) const
virtual

Print out the solution.

Reimplemented from AlpsSolution.

◆ encode() [1/10]

virtual AlpsReturnStatus AbcSolution::encode ( AlpsEncoded encoded) const
virtual

The method that encodes the solution into a encoded object.

Reimplemented from AlpsSolution.

◆ decodeToSelf() [1/3]

virtual AlpsReturnStatus AbcSolution::decodeToSelf ( AlpsEncoded encoded)
inlinevirtual

Decode the given AlpsEncoded object into this.

Reimplemented from AlpsSolution.

Definition at line 100 of file AbcSolution.h.

◆ decode() [1/3]

virtual AlpsKnowledge* AbcSolution::decode ( AlpsEncoded ) const
virtual

The method that decodes the solution from a encoded object.

Implements AlpsKnowledge.

◆ getObjValue() [2/3]

double AbcSolution::getObjValue ( ) const
inline

Get the objective value value.

Definition at line 68 of file AbcSolution.h.

◆ setObj() [2/3]

void AbcSolution::setObj ( double  obj)
inline

Definition at line 70 of file AbcSolution.h.

◆ setValue() [2/3]

void AbcSolution::setValue ( int  size,
double const *  value 
)
inline

Definition at line 72 of file AbcSolution.h.

◆ getQuality() [2/3]

virtual double AbcSolution::getQuality ( ) const
inlinevirtual

Definition at line 81 of file AbcSolution.h.

◆ getSize() [2/3]

int AbcSolution::getSize ( ) const
inline

Get the size of the solution.

Definition at line 84 of file AbcSolution.h.

◆ getColSolution() [3/6]

const double* AbcSolution::getColSolution ( ) const
inline

Get the column solution.

Definition at line 87 of file AbcSolution.h.

◆ getColSolution() [4/6]

double AbcSolution::getColSolution ( int  i) const
inline

Get item i in the solution vector.

Definition at line 91 of file AbcSolution.h.

◆ print() [2/3]

virtual void AbcSolution::print ( std::ostream &  os) const
virtual

Print out the solution.

Reimplemented from AlpsSolution.

◆ encode() [2/10]

virtual AlpsReturnStatus AbcSolution::encode ( AlpsEncoded encoded) const
virtual

The method that encodes the solution into a encoded object.

Reimplemented from AlpsSolution.

◆ decodeToSelf() [2/3]

virtual AlpsReturnStatus AbcSolution::decodeToSelf ( AlpsEncoded encoded)
inlinevirtual

Decode the given AlpsEncoded object into this.

Reimplemented from AlpsSolution.

Definition at line 100 of file AbcSolution.h.

◆ decode() [2/3]

virtual AlpsKnowledge* AbcSolution::decode ( AlpsEncoded ) const
virtual

The method that decodes the solution from a encoded object.

Implements AlpsKnowledge.

◆ getObjValue() [3/3]

double AbcSolution::getObjValue ( ) const
inline

Get the objective value value.

Definition at line 68 of file AbcSolution.h.

◆ setObj() [3/3]

void AbcSolution::setObj ( double  obj)
inline

Definition at line 70 of file AbcSolution.h.

◆ setValue() [3/3]

void AbcSolution::setValue ( int  size,
double const *  value 
)
inline

Definition at line 72 of file AbcSolution.h.

◆ getQuality() [3/3]

virtual double AbcSolution::getQuality ( ) const
inlinevirtual

Definition at line 81 of file AbcSolution.h.

◆ getSize() [3/3]

int AbcSolution::getSize ( ) const
inline

Get the size of the solution.

Definition at line 84 of file AbcSolution.h.

◆ getColSolution() [5/6]

const double* AbcSolution::getColSolution ( ) const
inline

Get the column solution.

Definition at line 87 of file AbcSolution.h.

◆ getColSolution() [6/6]

double AbcSolution::getColSolution ( int  i) const
inline

Get item i in the solution vector.

Definition at line 91 of file AbcSolution.h.

◆ print() [3/3]

virtual void AbcSolution::print ( std::ostream &  os) const
virtual

Print out the solution.

Reimplemented from AlpsSolution.

◆ encode() [3/10]

virtual AlpsReturnStatus AbcSolution::encode ( AlpsEncoded encoded) const
virtual

The method that encodes the solution into a encoded object.

Reimplemented from AlpsSolution.

◆ decodeToSelf() [3/3]

virtual AlpsReturnStatus AbcSolution::decodeToSelf ( AlpsEncoded encoded)
inlinevirtual

Decode the given AlpsEncoded object into this.

Reimplemented from AlpsSolution.

Definition at line 100 of file AbcSolution.h.

◆ decode() [3/3]

virtual AlpsKnowledge* AbcSolution::decode ( AlpsEncoded ) const
virtual

The method that decodes the solution from a encoded object.

Implements AlpsKnowledge.

◆ encode() [4/10]

virtual AlpsReturnStatus AlpsSolution::encode
inline

Encode this into the given AlpsEncoded object.

Definition at line 88 of file AlpsSolution.h.

◆ encode() [5/10]

virtual AlpsReturnStatus AlpsSolution::encode
inline

Encode this into the given AlpsEncoded object.

Definition at line 88 of file AlpsSolution.h.

◆ encode() [6/10]

AlpsEncoded* AlpsKnowledge::encode

Get encode defined in AlpsKnowledge.

◆ encode() [7/10]

virtual AlpsReturnStatus AlpsKnowledge::encode

Get encode defined in AlpsKnowledge.

◆ encode() [8/10]

virtual AlpsReturnStatus AlpsSolution::encode
inline

Encode this into the given AlpsEncoded object.

Definition at line 88 of file AlpsSolution.h.

◆ encode() [9/10]

AlpsEncoded* AlpsKnowledge::encode

Get encode defined in AlpsKnowledge.

◆ encode() [10/10]

virtual AlpsReturnStatus AlpsKnowledge::encode

Get encode defined in AlpsKnowledge.

Member Data Documentation

◆ size_

int AbcSolution::size_
private

Definition at line 39 of file AbcSolution.h.

◆ value_

double * AbcSolution::value_
private

Definition at line 40 of file AbcSolution.h.

◆ objective_

double AbcSolution::objective_
private

Definition at line 41 of file AbcSolution.h.


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