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

#include <AlpsSolution.h>

+ Inheritance diagram for AlpsSolution:
+ Collaboration diagram for AlpsSolution:

Public Member Functions

 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...
 
virtual void print (std::ostream &os) const
 Print out the solution. More...
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded) const
 Encode this into the given AlpsEncoded object. More...
 
virtual AlpsReturnStatus decodeToSelf (AlpsEncoded &encoded)
 Decode the given AlpsEncoded object into this. 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...
 
virtual AlpsKnowledgedecode (AlpsEncoded &encoded) const =0
 Decode the given AlpsEncoded object into a new AlpsKnowledge object and return a pointer to it. More...
 

Private Member Functions

 AlpsSolution (const AlpsSolution &)
 Diable copy constructor and assignment. More...
 
AlpsSolutionoperator= (const AlpsSolution &)
 

Private Attributes

int index_
 The index of the node where the solution was found. More...
 
int depth_
 The depth of the node where the solution was found. More...
 

Additional Inherited Members

- Public Attributes inherited from AlpsKnowledge
AlpsKnowledgeBrokerbroker_
 

Detailed Description

Definition at line 39 of file AlpsSolution.h.

Constructor & Destructor Documentation

◆ AlpsSolution() [1/3]

AlpsSolution::AlpsSolution ( const AlpsSolution )
private

Diable copy constructor and assignment.

◆ AlpsSolution() [2/3]

AlpsSolution::AlpsSolution ( )
inline

Default constructor.

Definition at line 55 of file AlpsSolution.h.

◆ AlpsSolution() [3/3]

AlpsSolution::AlpsSolution ( const AlpsNodeIndex_t  i,
const int  d 
)
inline

Constructor to set index and depth.

Definition at line 60 of file AlpsSolution.h.

◆ ~AlpsSolution()

virtual AlpsSolution::~AlpsSolution ( )
inlinevirtual

Destructor.

Definition at line 65 of file AlpsSolution.h.

Member Function Documentation

◆ operator=()

AlpsSolution& AlpsSolution::operator= ( const AlpsSolution )
private

◆ getIndex()

AlpsNodeIndex_t AlpsSolution::getIndex ( )
inline

Get index where solution was found.

Definition at line 68 of file AlpsSolution.h.

◆ setIndex()

void AlpsSolution::setIndex ( const AlpsNodeIndex_t  i)
inline

Set index where solution was found.

Definition at line 71 of file AlpsSolution.h.

◆ getDepth()

int AlpsSolution::getDepth ( )
inline

Get depth where solution was found.

Definition at line 74 of file AlpsSolution.h.

◆ setDepth()

void AlpsSolution::setDepth ( const int  d)
inline

Set depth where solution was found.

Definition at line 77 of file AlpsSolution.h.

◆ print()

virtual void AlpsSolution::print ( std::ostream &  os) const
inlinevirtual

Print out the solution.

Reimplemented in AbcSolution, AbcSolution, AbcSolution, and KnapSolution.

Definition at line 80 of file AlpsSolution.h.

◆ encode() [1/3]

virtual AlpsReturnStatus AlpsSolution::encode ( AlpsEncoded encoded) const
inlinevirtual

Encode this into the given AlpsEncoded object.

Reimplemented from AlpsKnowledge.

Reimplemented in AbcSolution, AbcSolution, AbcSolution, and KnapSolution.

Definition at line 88 of file AlpsSolution.h.

◆ decodeToSelf()

virtual AlpsReturnStatus AlpsSolution::decodeToSelf ( AlpsEncoded encoded)
inlinevirtual

Decode the given AlpsEncoded object into this.

Reimplemented from AlpsKnowledge.

Reimplemented in AbcSolution, AbcSolution, AbcSolution, and KnapSolution.

Definition at line 95 of file AlpsSolution.h.

◆ encode() [2/3]

AlpsEncoded* AlpsKnowledge::encode

Get encode defined in AlpsKnowledge.

◆ encode() [3/3]

virtual AlpsReturnStatus AlpsKnowledge::encode

Get encode defined in AlpsKnowledge.

Member Data Documentation

◆ index_

int AlpsSolution::index_
private

The index of the node where the solution was found.

Definition at line 47 of file AlpsSolution.h.

◆ depth_

int AlpsSolution::depth_
private

The depth of the node where the solution was found.

Definition at line 50 of file AlpsSolution.h.


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