LeafNode Class Reference

This is the class for the leaves, i.e. the last-stage nodes. More...

Inheritance diagram for LeafNode:

Inheritance graph
[legend]
Collaboration diagram for LeafNode:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LeafNode (StageNode *ptPred, const int nodeN, const double condProb, const double *ptRetVect, const double capTarget)
 Constructs a LeafNode object.

Public Attributes

MP_variable w
 shortage variable
MP_variable y
 surplus variable
MP_constraint finalBalance
 constraint for the final balance
MP_data Return
 returns of the assets at this node

Protected Member Functions

void make_obj_function_ ()
 version of make_obj_function_() for the leaves - no recursion


Detailed Description

This is the class for the leaves, i.e. the last-stage nodes.

Definition at line 121 of file investment.cpp.


Constructor & Destructor Documentation

LeafNode::LeafNode ( StageNode ptPred,
const int  nodeN,
const double  condProb,
const double *  ptRetVect,
const double  capTarget 
) [inline]

Constructs a LeafNode object.

In this case, we use a deep copy for the MP_data Return, i.e. the return values in the constraints are copied from the retVect array to the constraints. This means that the retVect array can be safely changed or deleted afterwards.

Definition at line 133 of file investment.cpp.

References StageNode::ASSETS, finalBalance, StageNode::ptParent, Return, w, StageNode::x, and y.


Member Function Documentation

void LeafNode::make_obj_function_ (  )  [inline, protected, virtual]

version of make_obj_function_() for the leaves - no recursion

Reimplemented from StageNode.

Definition at line 145 of file investment.cpp.

References StageNode::objFunction, StageNode::prob, w, and y.


Member Data Documentation

MP_variable LeafNode::w

shortage variable

Definition at line 123 of file investment.cpp.

Referenced by LeafNode(), and make_obj_function_().

MP_variable LeafNode::y

surplus variable

Definition at line 124 of file investment.cpp.

Referenced by LeafNode(), and make_obj_function_().

MP_constraint LeafNode::finalBalance

constraint for the final balance

Definition at line 125 of file investment.cpp.

Referenced by LeafNode().

MP_data LeafNode::Return

returns of the assets at this node

Definition at line 126 of file investment.cpp.

Referenced by LeafNode().


The documentation for this class was generated from the following file:
Generated on Mon Jan 26 10:53:08 2009 for investment by  doxygen 1.5.4