etirm::NMatrixVec< II > Class Template Reference

Helper class template used by EStepDiscrete for managing a vector containing pointers to RealMatrix objects. More...

#include <EStepDiscrete.h>

List of all members.

Public Types

typedef std::vector
< RealMatrix * >::iterator 
iterator
 Type of iterator over item matrices.

Public Member Functions

 NMatrixVec (II bitem, II eitem, int nlatentcat)
 Constructor.
 ~NMatrixVec ()
iterator begin ()
 Iterator to matrices over items.
RealMatrixoperator[] (int Index)
 Return pointer to matrix for item Index+1 (Index is zero-offset).

Private Attributes

std::vector< RealMatrix * > mVector


Detailed Description

template<class II>
class etirm::NMatrixVec< II >

Helper class template used by EStepDiscrete for managing a vector containing pointers to RealMatrix objects.

Template Parameters

Parameters:
II Iterator over item objects.

Definition at line 67 of file EStepDiscrete.h.


Member Typedef Documentation

template<class II>
typedef std::vector<RealMatrix *>::iterator etirm::NMatrixVec< II >::iterator

Type of iterator over item matrices.

Definition at line 73 of file EStepDiscrete.h.


Constructor & Destructor Documentation

template<class II>
etirm::NMatrixVec< II >::NMatrixVec ( II  bitem,
II  eitem,
int  nlatentcat 
) [inline]

Constructor.

Template Parameters

Parameters:
II Iterator over item objects.

Function Parameters

Parameters:
[in] bitem Iterator to first item.
[in] eitem Iterator to last item.
[in] nlatentcat Number of discrete categories of latent variable distribution.

Definition at line 114 of file EStepDiscrete.h.

References etirm::NMatrixVec< II >::mVector.

00114                                                                                    :
00115   mVector(eitem-bitem)
00116   {
00117     iterator ri = mVector.begin();
00118     for (II i = bitem; i != eitem; ++ri, ++i)
00119     {
00120       *ri = new RealMatrix((*i)->NumRespCat(), nlatentcat);
00121     }
00122   }

template<class II>
etirm::NMatrixVec< II >::~NMatrixVec (  )  [inline]

Destructor

Definition at line 125 of file EStepDiscrete.h.

References etirm::NMatrixVec< II >::mVector.

00126   {
00127     iterator ri = mVector.begin();
00128     for (int i = mVector.size(); i--; ++ri)
00129     {
00130       if (*ri)
00131       delete *ri;
00132     }
00133   }


Member Function Documentation

template<class II>
iterator etirm::NMatrixVec< II >::begin (  )  [inline]

Iterator to matrices over items.

Definition at line 78 of file EStepDiscrete.h.

References etirm::NMatrixVec< II >::mVector.

template<class II>
RealMatrix* etirm::NMatrixVec< II >::operator[] ( int  Index  )  [inline]

Return pointer to matrix for item Index+1 (Index is zero-offset).

Definition at line 84 of file EStepDiscrete.h.

References etirm::NMatrixVec< II >::mVector.


Member Data Documentation

template<class II>
std::vector<RealMatrix *> etirm::NMatrixVec< II >::mVector [private]

Each matrix corresponds to an item. The rows of each matrix contain a discrete latent variable distribution corresponding to one response.

Definition at line 93 of file EStepDiscrete.h.

Referenced by etirm::NMatrixVec< II >::begin(), etirm::NMatrixVec< II >::NMatrixVec(), etirm::NMatrixVec< II >::operator[](), and etirm::NMatrixVec< II >::~NMatrixVec().


The documentation for this class was generated from the following file:
Generated on Sat Mar 1 21:41:14 2008 for ETIRM by  doxygen 1.5.4