C:/programs/etirm/src/ItemParamPrior.cpp

Go to the documentation of this file.
00001 /*! \file ItemParamPrior.cpp
00002  
00003   \brief
00004   Class representing a prior distribution used for item parameters
00005   in Bayes modal estimation.
00006  
00007   Estimation Toolkit for Item Response Models (ETIRM)
00008   http://www.smallwaters.com/software/cpp/etirm.html 
00009 
00010   Author(s): 
00011   Werner Wothke, maintenance (http://www.smallwaters.com)
00012   Brad Hanson (http://www.b-a-h.com/)
00013   See the file LICENSE for information on usage and redistribution.
00014 
00015   Copyright (C) 2008, Werner Wothke
00016   Copyright (c) 2000-2001, Bradley A. Hanson
00017  */
00018 
00019 #ifdef ETIRM_NO_DIR_PREFIX
00020 #include "ItemParamPrior.h"
00021 #else
00022 #include "etirm/ItemParamPrior.h"
00023 #endif
00024 
00025 namespace etirm
00026 {
00027 
00028   /* Constructor initializing parameter vector */
00029   ItemParamPrior::ItemParamPrior(RealVector &param) :
00030     mParameters(param)
00031   {
00032   }
00033 
00034   /* Constructor initializing size of parameter vector, but not parameter values */
00035   ItemParamPrior::ItemParamPrior(int numparam) :
00036     mParameters(numparam)
00037   {
00038   }
00039 
00040   /* Destructor */
00041   ItemParamPrior::~ItemParamPrior()
00042   {
00043   }
00044 
00045   /* Set parameters of density */
00046   void ItemParamPrior::SetParameters(RealVector &param)
00047   {
00048     if (param.size() != NumParameters())  // Changed "==" to "!=" (ww, 2-22-2008)
00049       throw InvalidArgument("Invalid number of parameters in prior distribution",
00050           "ItemParamPrior::SetParameters");
00051 
00052     mParameters = param;
00053   }
00054 
00055   /* Get parameters of density */
00056   RealVector ItemParamPrior::GetParameters()
00057   {
00058     return RealVector(mParameters);
00059   }
00060 
00061 } // namespace etirem

Generated on Sat Mar 1 21:40:15 2008 for ETIRM by  doxygen 1.5.4