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

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

Public Member Functions | Private Attributes | List of all members
BcpsSubTree Class Reference

This class is the data structure for storing a subtree within BCPS. More...

`#include <BcpsSubTree.h>`

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

## Public Member Functions
| BcpsSubTree ()
virtual | ~BcpsSubTree ()
BcpsConstraintPool * | getConstraintPool () const
BcpsVariablePool * | getVariablePool () const
Public Member Functions inherited from AlpsSubTree
| AlpsSubTree ()
| Default constructor. More...
| AlpsSubTree (AlpsKnowledgeBroker *kb)
| Useful constructor. More...
virtual | ~AlpsSubTree ()
| Destructor. More...
AlpsTreeNode * | activeNode ()
| Get pointer to active node. More...
void | setActiveNode (AlpsTreeNode *activeNode)
| Set pointer to active node. More...
void | createChildren (AlpsTreeNode *parent, std::vector< CoinTriple< AlpsNodeDesc *, AlpsNodeStatus, double > > &children, AlpsNodePool *kidNodePool=NULL)
| Create children nodes from the given parent node. More...
AlpsSubTree * | splitSubTree (int &returnSize, int size=10)
| The function split the subtree and return a subtree of the specified size or available size. More...
virtual AlpsReturnStatus | exploreSubTree (AlpsTreeNode *root, int nodeLimit, double timeLimit, int &numNodesProcessed, int &numNodesBranched, int &numNodesDiscarded, int &numNodesPartial, int &depth)
| Explore the subtree from `root` as the root of the subtree for given number of nodes or time, depending on which one reach first. More...
AlpsReturnStatus | exploreUnitWork (bool leaveAsIt, int unitWork, double unitTime, AlpsExitStatus &solStatus, int &numNodesProcessed, int &numNodesBranched, int &numNodesDiscarded, int &numNodesPartial, int &depth, bool &betterSolution)
| Explore the subtree for certain amount of work/time. More...
virtual int | rampUp (int minNumNodes, int requiredNumNodes, int &depth, AlpsTreeNode *root=NULL)
| Generate required number (specified by a parameter) of nodes. More...
virtual AlpsEncoded * | encode () const
| This method should encode the content of the subtree and return a pointer to the encoded form. More...
virtual AlpsKnowledge * | decode (AlpsEncoded &encoded) const
| This method should decode and return a pointer to a brand new object, i.e., the method must create a new object on the heap from the decoded data instead of filling up the object for which the method was invoked. More...
virtual AlpsSubTree * | newSubTree () const
| Create a AlpsSubtree object dynamically. More...
void | clearNodePools ()
| Remove nodes in pools in the subtree. More...
void | nullRootActiveNode ()
| Set root and active node to null. More...
void | reset ()
| Move nodes in node pool, null active node. More...
AlpsTreeNode * | getRoot () const
| Get the root node of this subtree. More...
void | setRoot (AlpsTreeNode *r)
| Set the root node of this subtree. More...
AlpsNodePool * | nodePool ()
| Access the node pool. More...
AlpsNodePool * | diveNodePool ()
| Access the node pool. More...
void | setNodePool (AlpsNodePool *np)
| Set node pool. More...
void | changeNodePool (AlpsNodePool *np)
| Set node pool. More...
double | getBestKnowledgeValue () const
| Get the quality of the best node in the subtree. More...
AlpsTreeNode * | getBestNode () const
| Get the "best" node in the subtree. More...
AlpsKnowledgeBroker * | getKnowledgeBroker () const
| Get the knowledge broker. More...
void | setKnowledgeBroker (AlpsKnowledgeBroker *kb)
| Set a pointer to the knowledge broker. More...
double | getQuality () const
| Get the quality of this subtree. More...
double | getSolEstimate () const
| Get the emtimated quality of this subtree. More...
void | incDiveDepth (int num=1)
| Increment dive depth. More...
int | getDiveDepth ()
| Get dive depth. More...
void | setDiveDepth (int num)
| Set dive depth. More...
double | calculateQuality ()
| Calcuate and return the quality of this subtree, which is measured by the quality of the specified number of nodes. More...
int | nextIndex ()
| Get the root node of this subtree. More...
int | getNextIndex () const
| Get the index of the next generated node. More...
void | setNextIndex (int next)
| Set the index of the next generated node. More...
int | getNumNodes () const
| Return the number of nodes on this subtree. More...
void | setNodeSelection (AlpsSearchStrategy< AlpsTreeNode * > *nc)
| Set the node comparision rule. More...
Public Member Functions inherited from AlpsKnowledge
| AlpsKnowledge ()
virtual | ~AlpsKnowledge ()
KnowledgeType | getType ()
void | setType (KnowledgeType t)
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded)
| Pack into a encode object. More...
AlpsEncoded * | getEncoded () const
| Get/set encoded. More...
void | setEncoded (AlpsEncoded *e)

## Private Attributes
BcpsConstraintPool * | constraintPool_
| This is the list of objects that exist in the subtree. More...
BcpsVariablePool * | variablePool_

## Additional Inherited Members
Protected Member Functions inherited from AlpsSubTree
void | removeDeadNodes (AlpsTreeNode *&node)
| The purpose of this method is to remove nodes that are not needed in the description of the subtree. More...
void | replaceNode (AlpsTreeNode *oldNode, AlpsTreeNode *newNode)
| This function replaces `oldNode` with `newNode` in the tree. More...
void | fathomAllNodes ()
| Fathom all nodes on this subtree. More...
Protected Attributes inherited from AlpsSubTree
AlpsTreeNode * | root_
| The root of the sub tree. More...
AlpsNodePool * | nodePool_
| A node pool containing the leaf nodes awaiting processing. More...
AlpsNodePool * | diveNodePool_
| A node pool used when diving. More...
AlpsSearchStrategy < AlpsTreeNode * > * | diveNodeRule_
| Diving node comparing rule. More...
int | diveDepth_
| Diving depth. More...
AlpsTreeNode * | activeNode_
| The next index to be assigned to a new search tree node. More...
double | quality_
| A quantity indicating how good this subtree is. More...
AlpsKnowledgeBroker * | broker_
| A pointer to the knowledge broker of the process where this subtree is processed. More...
Protected Attributes inherited from AlpsKnowledge
KnowledgeType | type_

## Detailed Description

This class is the data structure for storing a subtree within BCPS.

The biggest addition to the fields that already exist withink ALPS is the storage for the global list of objects that are active within that subtree. Initally, this will be implemeted as a std::set, but later on should be changed to something more efficient such as a hash table or something like that.

Definition at line 42 of file BcpsSubTree.h.

## Constructor & Destructor Documentation

BcpsSubTree::BcpsSubTree | ( |  | ) |
| inline

Definition at line 49 of file BcpsSubTree.h.

virtual BcpsSubTree::~BcpsSubTree | ( |  | ) |
| inline virtual

Definition at line 54 of file BcpsSubTree.h.

## Member Function Documentation

BcpsConstraintPool* BcpsSubTree::getConstraintPool | ( |  | ) | const
| inline

Definition at line 60 of file BcpsSubTree.h.

BcpsVariablePool* BcpsSubTree::getVariablePool | ( |  | ) | const
| inline

Definition at line 65 of file BcpsSubTree.h.

## Member Data Documentation

BcpsConstraintPool* BcpsSubTree::constraintPool_
| private

This is the list of objects that exist in the subtree.

Definition at line 45 of file BcpsSubTree.h.

BcpsVariablePool* BcpsSubTree::variablePool_
| private

Definition at line 46 of file BcpsSubTree.h.

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

- /tmp/CHiPPS-Blis-0.94.3/Bcps/src/BcpsSubTree.h