Public Member Functions | Public Attributes

bio_iterator::metaIterator Class Reference

meta iterators are designed to iterate on group of rows of the data file. More...

Inheritance diagram for bio_iterator::metaIterator:
bio_iterator::iterator

List of all members.

Public Member Functions

def __init__

Public Attributes

 type

Detailed Description

meta iterators are designed to iterate on group of rows of the data file.

They are typically used for panel data, where several rows correspond to the same individual. In the example represented in the table below, the meta iterator will identify 4 groups of data: rows 1 to 4, rows 5 to 7, rows 8 to 9 and rows 10 to 11. Note that group 1 and group 4 share the same Id. But the iterator does not take this into account, as only changes of the value of the identifier characterize a change of group. If rows 10 and 11 indeed belong to group 1, the data file must be edited so that they appear directly after row 4.

__rowId__       Id      ObsId   Variables
        1       1       1       ...
        2       1       2       ...
        3       1       3       ...
        4       1       4       ...
        5       2       1       ...
        6       2       2       ...
        7       2       3       ...
        8       3       1       ...
        9       3       2       ...
       10       1       5       ...
       11       1       6       ...

An example of iterator on this data is

metaIterator('personIter','__dataFile__','panelObsIter','Id')
rowIterator('panelObsIter','personIter')

Constructor & Destructor Documentation

def bio_iterator::metaIterator::__init__ (   self,
  iteratorName,
  name,
  child,
  variable 
)
Parameters:
iteratorNameName of the iterator.
nameName of the set of data that is being iterated. It is either the name of a metaiterator, or the string __dataFile__, when the iterator spans the entire database.
childName of the child
variableVariable that contains the ID of the elements being iterated.

Reimplemented from bio_iterator::iterator.


Member Data Documentation


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