--------------------------------------- lines 8-120 of file: src/initialize.cpp --------------------------------------- {xrst_begin initialize} {xrst_spell cout itr nnz nr var } Initialization After Constructor ################################ Syntax ****** *size_map* = *mixed_object* . ``initialize`` ( *fixed_vec* , *random_vec* ) Public ****** This ``cppad_mixed`` :ref:`base_class-name` member function is public. Purpose ******* Some of the ``cppad_mixed`` initialization requires calling the derived class version of the :ref:`ran_likelihood-name` function. Hence this initialization cannot be done until after the :ref:`derived constructor` completes. mixed_object ************ We use :ref:`derived_ctor@mixed_object` to denote an object of a class that is derived from the ``cppad_mixed`` base class. fixed_vec ********* This argument has prototype ``const CppAD::vector&`` *fixed_vec* It specifies the value of the :ref:`fixed effects` vector :math:`\theta` at which certain ``CppAD::ADFun`` objects are recorded. random_vec ********** This argument has prototype ``const CppAD::vector&`` *random_vec* It specifies the value of the :ref:`random effects` vector :math:`u` at which certain ``CppAD::ADFun`` objects are recorded. size_map ******** The return value has prototype ``std::map`` *size_map* It represent the size of certain aspects of the problem. n_fixed ======= the number of fixed effects. n_random ======== the number of fixed effects. quasi_fixed =========== If this is one (zero) are a using a quasi-Newton (Newton) method for optimizing the fixed effects. A_nr ==== is the number of rows in the liner constraint matrix A (the matrix has *n_fixed* columns). A_nnz ===== is the number of non-zeros in the liner constraint matrix A. ran_like_fun.size_var ===================== is the number of variables in the algorithm that maps the fixed and random effects to the part of the likelihood that depend on the random effects. fix_like_fun.size_var ===================== is the number of variables in the algorithm that maps the fixed effects to the part of the likelihood that does not depend on the random effects. Other Fields ============ Not all the fields in *size_map* are specified, but they can be inspected. For example, | |tab| ``std::map::iterator itr`` ; | |tab| ``for`` ( ``itr`` = *size_map* . ``begin`` (); ``itr`` != *size_map* . ``end`` (); ``itr`` ++) | |tab| |tab| ``std::cout << itr->first <<`` " = " << ``itr->second <<`` "\\ ``n`` "; Example ******* The file :ref:`derived_ctor.cpp-name` contains an example of using ``initialize`` . {xrst_end initialize}