Public Member Functions | Public Attributes

bio_expression::Enumerate Class Reference

Class performing a sample enumeration. More...

Inheritance diagram for bio_expression::Enumerate:
bio_expression::Expression

List of all members.

Public Member Functions

def __init__
def getExpression

Public Attributes

 theDict
 iteratorName
 operatorIndex

Detailed Description

Class performing a sample enumeration.

The concept of iterators (see the section "Iterators"), identifies a sequence such that, for each instance, the value of the variables is read from the data file, and an expression can be evaluated. In sample enumeration, expressions are computed for each instance in the sample and reported in a file. Example:

 simulate = {'Prob. 1': P1, 'Prob. 2': P2, 'Util. 1': V1, 'Util. 2':V2, 'Diff. util.': V1-V2}
 rowIterator('obsIter') 
 BIOGEME_OBJECT.SIMULATE = Enumerate(simulate,'obsIter')

Note that this expression is used exclusively for simulation. Contrarily to all other expressions, it does not return any value and, consequently, cannot be included in another expression. Something like

 X + Enumerate(V,'obsIter') / 2 

does not make any sense.


Constructor & Destructor Documentation

def bio_expression::Enumerate::__init__ (   self,
  term,
  iteratorName 
)
Parameters:
terma dictionary (see Python documentation)) of the form

 {label: expression, label: expression,...}

where label is used to describe the results in the output file, and expression is a valid expression.

iteratorNamename of an iterator already defined.

Member Function Documentation

def bio_expression::Enumerate::getExpression (   self )
Returns:
Return the string representation of the current expression

Reimplemented from bio_expression::Expression.


Member Data Documentation

Reimplemented from bio_expression::Expression.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables