diff --git a/inst/include/common/data_object.hpp b/inst/include/common/data_object.hpp index 491f95590..fe726fa1f 100644 --- a/inst/include/common/data_object.hpp +++ b/inst/include/common/data_object.hpp @@ -44,13 +44,13 @@ namespace fims_data_object { */ template struct DataObject : public fims_model_object::FIMSObject { - static uint32_t id_g; /*!< id of the Data Object >*/ - std::vector data; /*!< vector of the data >*/ - size_t dimensions; /*!< dimension of the Data object >*/ - size_t imax; /*!<1st dimension of data object >*/ - size_t jmax; /*!< 2nd dimension of data object>*/ - size_t kmax; /*!< 3rd dimension of data object>*/ - size_t lmax; /*!< 4th dimension of data object>*/ + static uint32_t id_g; /**< id of the Data Object >*/ + std::vector data; /**< vector of the data >*/ + size_t dimensions; /**< dimension of the Data object >*/ + size_t imax; /**<1st dimension of data object >*/ + size_t jmax; /**< 2nd dimension of data object>*/ + size_t kmax; /**< 3rd dimension of data object>*/ + size_t lmax; /**< 4th dimension of data object>*/ /** * Constructs a one-dimensional data object. diff --git a/inst/include/common/def.hpp b/inst/include/common/def.hpp index 85756b93b..315c4d542 100644 --- a/inst/include/common/def.hpp +++ b/inst/include/common/def.hpp @@ -1,4 +1,4 @@ -/*! \file def.hpp +/** \file def.hpp */ /* diff --git a/inst/include/common/fims_math.hpp b/inst/include/common/fims_math.hpp index 6665406bf..dcdf42d06 100644 --- a/inst/include/common/fims_math.hpp +++ b/inst/include/common/fims_math.hpp @@ -1,4 +1,4 @@ -/*! \file fims_math.hpp +/** \file fims_math.hpp */ // note: To document a global C function, typedef, enum or preprocessor // definition you must first document the file that contains it diff --git a/inst/include/common/information.hpp b/inst/include/common/information.hpp index 9111d1219..3c3794139 100644 --- a/inst/include/common/information.hpp +++ b/inst/include/common/information.hpp @@ -1,4 +1,4 @@ -/*! \file information.hpp +/** \file information.hpp * * This File is part of the NOAA, National Marine Fisheries Service * Fisheries Integrated Modeling System project. See LICENSE in the @@ -45,14 +45,14 @@ class Information { // data objects std::map > > - data_objects; /*!< map that holds data objects >*/ + data_objects; /**< map that holds data objects >*/ typedef typename std::map< uint32_t, std::shared_ptr > >::iterator data_iterator; /**< iterator for the data objects */ // life history modules std::map > > - recruitment_models; /*! > >::iterator @@ -60,7 +60,7 @@ class Information { /**< iterator for recruitment objects>*/ std::map > > - selectivity_models; /*! > >::iterator @@ -68,7 +68,7 @@ class Information { /**< iterator for selectivity objects>*/ std::map > > - growth_models; /*! > >::iterator @@ -76,7 +76,7 @@ class Information { /**< iterator for growth objects>*/ std::map > > - maturity_models; /*! > >::iterator @@ -85,7 +85,7 @@ class Information { // fleet modules std::map > > - fleets; /*! > > - populations; /*! > >::iterator @@ -105,7 +105,7 @@ class Information { // distributions std::map > > - distribution_models; /*! class Model { // may need singleton public: static std::shared_ptr > - fims_model; /*!< Create a shared fims_model as a pointer to Model*/ + fims_model; /**< Create a shared fims_model as a pointer to Model*/ std::shared_ptr > - fims_information; /*!< Create a shared fims_information as a pointer to + fims_information; /**< Create a shared fims_information as a pointer to Information*/ #ifdef TMB_MODEL diff --git a/inst/include/common/model_object.hpp b/inst/include/common/model_object.hpp index f67579327..28ef1e7c8 100644 --- a/inst/include/common/model_object.hpp +++ b/inst/include/common/model_object.hpp @@ -23,12 +23,12 @@ namespace fims_model_object { */ template struct FIMSObject { - uint32_t id; /*!< unique identifier assigned for all fims objects */ - std::vector parameters; /*!< list of estimable parameters */ + uint32_t id; /**< unique identifier assigned for all fims objects */ + std::vector parameters; /**< list of estimable parameters */ std::vector - random_effects_parameters; /*!< list of all random effects parameters */ + random_effects_parameters; /**< list of all random effects parameters */ std::vector - fixed_effects_parameters; /*!< list of fixed effects parameters */ + fixed_effects_parameters; /**< list of fixed effects parameters */ virtual ~FIMSObject() {} /** diff --git a/inst/include/distributions/functors/distributions_base.hpp b/inst/include/distributions/functors/distributions_base.hpp index 5c55dc3c3..5a50d05db 100644 --- a/inst/include/distributions/functors/distributions_base.hpp +++ b/inst/include/distributions/functors/distributions_base.hpp @@ -1,4 +1,4 @@ -/*! \file distributions_base.hpp +/** \file distributions_base.hpp * This File is part of the NOAA, National Marine Fisheries Service * Fisheries Integrated Modeling System project. See LICENSE in the * source folder for reuse information. diff --git a/inst/include/distributions/functors/tmb_distributions.hpp b/inst/include/distributions/functors/tmb_distributions.hpp index b3a0ee8c1..6d96100f3 100644 --- a/inst/include/distributions/functors/tmb_distributions.hpp +++ b/inst/include/distributions/functors/tmb_distributions.hpp @@ -1,4 +1,4 @@ -/*! \file tmb_distributions.hpp +/** \file tmb_distributions.hpp * This File is part of the NOAA, National Marine Fisheries Service * Fisheries Integrated Modeling System project. * Refer to the LICENSE file for reuse information. @@ -20,9 +20,9 @@ namespace fims_distributions { */ template struct Dnorm : public DistributionsBase { - Type x; /*!< observation */ - Type mean; /*!< mean of the normal distribution */ - Type sd; /*!< standard deviation of the normal distribution, must be strictly + Type x; /**< observation */ + Type mean; /**< mean of the normal distribution */ + Type sd; /**< standard deviation of the normal distribution, must be strictly positive.*/ Dnorm() : DistributionsBase() {} @@ -48,8 +48,8 @@ template struct Dmultinom : public DistributionsBase { /** EigenVector defined in interface.hpp */ using Vector = typename fims::ModelTraits::EigenVector; - Vector x; /*!< Vector of length K of integers */ - Vector p; /*!< Vector of length K, specifying the probability for the K + Vector x; /**< Vector of length K of integers */ + Vector p; /**< Vector of length K, specifying the probability for the K classes (note, unlike in R these must sum to 1). */ Dmultinom() : DistributionsBase() {} @@ -74,9 +74,9 @@ struct Dmultinom : public DistributionsBase { */ template struct Dlnorm : public DistributionsBase { - Type x; /*!< observation */ - Type meanlog; /*!< mean of the distribution of log(x) */ - Type sdlog; /*!< standard deviation of the distribution of log(x) */ + Type x; /**< observation */ + Type meanlog; /**< mean of the distribution of log(x) */ + Type sdlog; /**< standard deviation of the distribution of log(x) */ Dlnorm() : DistributionsBase() {} diff --git a/inst/include/interface/rcpp/rcpp_objects/rcpp_data.hpp b/inst/include/interface/rcpp/rcpp_objects/rcpp_data.hpp index d3cd9e955..82fa7718c 100644 --- a/inst/include/interface/rcpp/rcpp_objects/rcpp_data.hpp +++ b/inst/include/interface/rcpp/rcpp_objects/rcpp_data.hpp @@ -19,7 +19,7 @@ */ class DataInterfaceBase : public FIMSRcppInterfaceBase { public: - Rcpp::NumericVector observed_data; /*!< The data */ + Rcpp::NumericVector observed_data; /**< The data */ static uint32_t id_g; /**< static id of the DataInterfaceBase object */ uint32_t id; /**< local id of the DataInterfaceBase object */ // live objects in C++ are objects that have been created and live in memory @@ -42,7 +42,7 @@ class DataInterfaceBase : public FIMSRcppInterfaceBase { virtual ~DataInterfaceBase() {} /** @brief get the ID of the interface base object - **/ + */ virtual uint32_t get_id() { return this->id; } /**@brief add_to_fims_tmb dummy method @@ -60,9 +60,9 @@ std::map DataInterfaceBase::live_objects; */ class AgeCompDataInterface : public DataInterfaceBase { public: - int amax; /*!< first dimension of the data */ - int ymax; /*!< second dimension of the data */ - Rcpp::NumericVector age_comp_data; /*!id; } #ifdef TMB_MODEL @@ -127,8 +127,8 @@ class AgeCompDataInterface : public DataInterfaceBase { */ class IndexDataInterface : public DataInterfaceBase { public: - int ymax; /*!< second dimension of the data */ - Rcpp::NumericVector index_data; /*!id; } #ifdef TMB_MODEL diff --git a/inst/include/interface/rcpp/rcpp_objects/rcpp_fleet.hpp b/inst/include/interface/rcpp/rcpp_objects/rcpp_fleet.hpp index 2a02c813f..b0706dced 100644 --- a/inst/include/interface/rcpp/rcpp_objects/rcpp_fleet.hpp +++ b/inst/include/interface/rcpp/rcpp_objects/rcpp_fleet.hpp @@ -37,7 +37,7 @@ objects */ virtual ~FleetInterfaceBase() {} - /** @brief get_id method for child fleet interface objects to inherit **/ + /** @brief get_id method for child fleet interface objects to inherit */ virtual uint32_t get_id() = 0; }; @@ -52,29 +52,29 @@ std::map FleetInterfaceBase::live_objects; */ class FleetInterface : public FleetInterfaceBase { int interface_agecomp_likelihood_id_m = - -999; /*!< id of agecomp likelihood component. The "interface_" prefix + -999; /**< id of agecomp likelihood component. The "interface_" prefix indicates it belongs to the FleetInterface class, and the "_m" postfix signifies that it's a member variable. */ int interface_index_likelihood_id_m = - -999; /*!< id of index likelihood component*/ + -999; /**< id of index likelihood component*/ int interface_observed_agecomp_data_id_m = - -999; /*!< id of observed agecomp data object*/ + -999; /**< id of observed agecomp data object*/ int interface_observed_index_data_id_m = - -999; /*!< id of observed index data object*/ - int interface_selectivity_id_m = -999; /*!< id of selectivity component*/ + -999; /**< id of observed index data object*/ + int interface_selectivity_id_m = -999; /**< id of selectivity component*/ public: - bool is_survey = false; /*!< whether this is a survey fleet */ - int nages; /*!< number of ages in the fleet data*/ - int nyears; /*!< number of years in the fleet data */ - double log_q; /*!< log of catchability for the fleet*/ + bool is_survey = false; /**< whether this is a survey fleet */ + int nages; /**< number of ages in the fleet data*/ + int nyears; /**< number of years in the fleet data */ + double log_q; /**< log of catchability for the fleet*/ Rcpp::NumericVector - log_Fmort; /*!< log of fishing mortality rate for the fleet*/ - bool estimate_F = false; /*!< whether the parameter F should be estimated*/ - bool estimate_q = false; /*!< whether the parameter q should be estimated*/ - bool random_q = false; /*!< whether q should be a random effect*/ - bool random_F = false; /*!< whether F should be a random effect*/ - Parameter log_obs_error; /*!< the log of the observation error */ + log_Fmort; /**< log of fishing mortality rate for the fleet*/ + bool estimate_F = false; /**< whether the parameter F should be estimated*/ + bool estimate_q = false; /**< whether the parameter q should be estimated*/ + bool random_q = false; /**< whether q should be a random effect*/ + bool random_F = false; /**< whether F should be a random effect*/ + Parameter log_obs_error; /**< the log of the observation error */ FleetInterface() : FleetInterfaceBase() {} diff --git a/inst/include/interface/rcpp/rcpp_objects/rcpp_growth.hpp b/inst/include/interface/rcpp/rcpp_objects/rcpp_growth.hpp index 543fc7853..78ba050d5 100644 --- a/inst/include/interface/rcpp/rcpp_objects/rcpp_growth.hpp +++ b/inst/include/interface/rcpp/rcpp_objects/rcpp_growth.hpp @@ -11,9 +11,9 @@ #include "../../../population_dynamics/growth/growth.hpp" #include "rcpp_interface_base.hpp" -/**************************************************************** +/** * Growth Rcpp interface * - ***************************************************************/ + */ /** * @brief Rcpp interface that serves as the parent class for @@ -40,10 +40,10 @@ objects */ virtual ~GrowthInterfaceBase() {} - /** @brief get_id method for child growth interface objects to inherit **/ + /** @brief get_id method for child growth interface objects to inherit */ virtual uint32_t get_id() = 0; - /** @brief evaluate method for child growth interface objects to inherit **/ + /** @brief evaluate method for child growth interface objects to inherit */ virtual double evaluate(double age) = 0; }; @@ -78,7 +78,7 @@ vectors have been set */ * @param ages Type vector of ages * @return std::map * - * */ + */ inline std::map make_map(std::vector ages, std::vector weights) { std::map mymap; @@ -91,7 +91,7 @@ vectors have been set */ /** @brief Rcpp interface to the EWAAgrowth evaluate method * you can call from R using * ewaagrowth.evaluate(age) - * */ + */ virtual double evaluate(double age) { fims_popdy::EWAAgrowth EWAAGrowth; diff --git a/inst/include/interface/rcpp/rcpp_objects/rcpp_maturity.hpp b/inst/include/interface/rcpp/rcpp_objects/rcpp_maturity.hpp index 83cf499bf..709d37b5b 100644 --- a/inst/include/interface/rcpp/rcpp_objects/rcpp_maturity.hpp +++ b/inst/include/interface/rcpp/rcpp_objects/rcpp_maturity.hpp @@ -13,14 +13,14 @@ #include "../../../population_dynamics/maturity/maturity.hpp" #include "rcpp_interface_base.hpp" -/**************************************************************** - * maturity Rcpp interface * - ***************************************************************/ +/** + * maturity Rcpp interface + */ /** * @brief MaturityInterfaceBase class should be inherited to * define different Rcpp interfaces for each possible maturity function - * */ + */ class MaturityInterfaceBase : public FIMSRcppInterfaceBase { public: static uint32_t id_g; /**< static id of the recruitment interface base*/ @@ -41,7 +41,7 @@ class MaturityInterfaceBase : public FIMSRcppInterfaceBase { virtual ~MaturityInterfaceBase() {} /** @brief get the ID of the interface base object - **/ + */ virtual uint32_t get_id() = 0; /** diff --git a/inst/include/interface/rcpp/rcpp_objects/rcpp_nll.hpp b/inst/include/interface/rcpp/rcpp_objects/rcpp_nll.hpp index 9d3250e93..405ef1631 100644 --- a/inst/include/interface/rcpp/rcpp_objects/rcpp_nll.hpp +++ b/inst/include/interface/rcpp/rcpp_objects/rcpp_nll.hpp @@ -16,7 +16,7 @@ * @brief NLLInterfaceBase class should be inherited to * define different Rcpp interfaces for each possible negative log-likelihood * function - * */ + */ class NLLInterfaceBase : public FIMSRcppInterfaceBase { public: static uint32_t id_g; /**< static id of the recruitment interface base*/ @@ -36,10 +36,10 @@ class NLLInterfaceBase : public FIMSRcppInterfaceBase { virtual ~NLLInterfaceBase() {} /** @brief get the ID of the interface base object - **/ + */ virtual uint32_t get_id() = 0; - /** @brief evaluate method for child nll interface objects to inherit **/ + /** @brief evaluate method for child nll interface objects to inherit */ virtual double evaluate_nll() = 0; }; diff --git a/inst/include/interface/rcpp/rcpp_objects/rcpp_population.hpp b/inst/include/interface/rcpp/rcpp_objects/rcpp_population.hpp index 14f64d21b..b336ff572 100644 --- a/inst/include/interface/rcpp/rcpp_objects/rcpp_population.hpp +++ b/inst/include/interface/rcpp/rcpp_objects/rcpp_population.hpp @@ -11,14 +11,14 @@ #include "../../../population_dynamics/population/population.hpp" #include "rcpp_interface_base.hpp" -/**************************************************************** - * Population Rcpp interface * - ***************************************************************/ +/** + * Population Rcpp interface + */ /** * @brief PopulationInterfaceBase class should be inherited to * define different Rcpp interfaces for each possible Population function - * */ + */ class PopulationInterfaceBase : public FIMSRcppInterfaceBase { public: static uint32_t id_g; /**< static id of the population interface base*/ diff --git a/inst/include/interface/rcpp/rcpp_objects/rcpp_recruitment.hpp b/inst/include/interface/rcpp/rcpp_objects/rcpp_recruitment.hpp index 8eb351d3e..9f74f48c4 100644 --- a/inst/include/interface/rcpp/rcpp_objects/rcpp_recruitment.hpp +++ b/inst/include/interface/rcpp/rcpp_objects/rcpp_recruitment.hpp @@ -12,14 +12,14 @@ #include "../../../population_dynamics/recruitment/recruitment.hpp" #include "rcpp_interface_base.hpp" -/**************************************************************** - * Recruitment Rcpp interface * - ***************************************************************/ +/** + * Recruitment Rcpp interface + */ /** * @brief RecruitmentInterfaceBase class should be inherited to * define different Rcpp interfaces for each possible Recruitment function - * */ + */ class RecruitmentInterfaceBase : public FIMSRcppInterfaceBase { public: static uint32_t id_g; /**< static id of the recruitment interface base*/ @@ -30,8 +30,7 @@ class RecruitmentInterfaceBase : public FIMSRcppInterfaceBase { // static std::vector recruit_deviations; /**< vector of recruitment // deviations*/ - /// static bool constrain_deviations; /**< whether or not the rec devs are - /// constrained*/ + // static bool constrain_deviations; /**< whether or not the rec devs are constrained*/ RecruitmentInterfaceBase() { this->id = RecruitmentInterfaceBase::id_g++; @@ -44,11 +43,11 @@ class RecruitmentInterfaceBase : public FIMSRcppInterfaceBase { virtual ~RecruitmentInterfaceBase() {} /** @brief get the ID of the interface base object - **/ + */ virtual uint32_t get_id() = 0; /** @brief evaluate method for child recruitment interface objects to inherit - * **/ + */ virtual double evaluate(double spawners, double ssbzero) = 0; /** diff --git a/inst/include/interface/rcpp/rcpp_objects/rcpp_selectivity.hpp b/inst/include/interface/rcpp/rcpp_objects/rcpp_selectivity.hpp index 5f282cebc..9cc7c88d7 100644 --- a/inst/include/interface/rcpp/rcpp_objects/rcpp_selectivity.hpp +++ b/inst/include/interface/rcpp/rcpp_objects/rcpp_selectivity.hpp @@ -12,14 +12,14 @@ #include "../../../population_dynamics/selectivity/selectivity.hpp" #include "rcpp_interface_base.hpp" -/**************************************************************** - * Selectivity Rcpp interface * - ***************************************************************/ +/** + * Selectivity Rcpp interface + */ /** * @brief SelectivityInterfaceBase class should be inherited to * define different Rcpp interfaces for each possible Selectivity function - * */ + */ class SelectivityInterfaceBase : public FIMSRcppInterfaceBase { public: static uint32_t id_g; /**< static id of the recruitment interface base*/ @@ -40,7 +40,7 @@ class SelectivityInterfaceBase : public FIMSRcppInterfaceBase { virtual ~SelectivityInterfaceBase() {} /** @brief get the ID of the interface base object - **/ + */ virtual uint32_t get_id() = 0; /** diff --git a/inst/include/interface/rcpp/rcpp_objects/rcpp_tmb_distribution.hpp b/inst/include/interface/rcpp/rcpp_objects/rcpp_tmb_distribution.hpp index cfce6d1fc..c7cbf9aa1 100644 --- a/inst/include/interface/rcpp/rcpp_objects/rcpp_tmb_distribution.hpp +++ b/inst/include/interface/rcpp/rcpp_objects/rcpp_tmb_distribution.hpp @@ -38,11 +38,11 @@ DistributionsInterfaceBase objects */ virtual ~DistributionsInterfaceBase() {} /** @brief get_id method for child distribution interface objects to inherit - * **/ + */ virtual uint32_t get_id() = 0; /** @brief evaluate method for child distribution interface objects to inherit - * **/ + */ virtual double evaluate(bool do_log) = 0; }; @@ -64,8 +64,8 @@ std::map struct Fleet : public fims_model_object::FIMSObject { - static uint32_t id_g; /*!< reference id for fleet object*/ - size_t nyears; /*!< the number of years in the model*/ - size_t nages; /*!< the number of ages in the model*/ + static uint32_t id_g; /**< reference id for fleet object*/ + size_t nyears; /**< the number of years in the model*/ + size_t nages; /**< the number of ages in the model*/ using ParameterVector = - typename fims::ModelTraits::ParameterVector; /*!< vector of fleet + typename fims::ModelTraits::ParameterVector; /**< vector of fleet parameters */ // This likelihood index is not currently being used as only one likelihood // distribution is available. These are for a future update M2+. int fleet_index_likelihood_id_m = - -999; /*!> - index_likelihood; /*!< index likelihood component*/ + index_likelihood; /**< index likelihood component*/ // This likelihood index is not currently being used as only one likelihood // distribution is available. These are for a future update M2+. int fleet_agecomp_likelihood_id_m = - -999; /*!< id of agecomp likelihood component*/ + -999; /**< id of agecomp likelihood component*/ std::shared_ptr> - agecomp_likelihood; /*!< agecomp likelihood component*/ + agecomp_likelihood; /**< agecomp likelihood component*/ // selectivity - int fleet_selectivity_id_m = -999; /*!< id of selectivity component*/ + int fleet_selectivity_id_m = -999; /**< id of selectivity component*/ std::shared_ptr> - selectivity; /*!< selectivity component*/ + selectivity; /**< selectivity component*/ - int fleet_observed_index_data_id_m = -999; /*!< id of index data */ + int fleet_observed_index_data_id_m = -999; /**< id of index data */ std::shared_ptr> - observed_index_data; /*!< observed index data*/ + observed_index_data; /**< observed index data*/ - int fleet_observed_agecomp_data_id_m = -999; /*!< id of age comp data */ + int fleet_observed_agecomp_data_id_m = -999; /**< id of age comp data */ std::shared_ptr> - observed_agecomp_data; /*!< observed agecomp data*/ + observed_agecomp_data; /**< observed agecomp data*/ // Mortality and catchability - ParameterVector log_Fmort; /*!< estimated parameter: log Fishing mortality*/ - Type log_q; /*!< estimated parameter: catchability of the fleet */ + ParameterVector log_Fmort; /**< estimated parameter: log Fishing mortality*/ + Type log_q; /**< estimated parameter: catchability of the fleet */ - Type log_obs_error; /*!< estimated parameter: observation error associated + Type log_obs_error; /**< estimated parameter: observation error associated with index */ - ParameterVector Fmort; /*!< transformed parameter: Fishing mortality*/ - Type q; /*!< transofrmed parameter: the catchability of the fleet */ + ParameterVector Fmort; /**< transformed parameter: Fishing mortality*/ + Type q; /**< transofrmed parameter: the catchability of the fleet */ // derived quantities - std::vector catch_at_age; /*! catch_index; /*! age_composition; /*! catch_at_age; /** catch_index; /** age_composition; /** expected_catch; /*! expected_index; /*! catch_numbers_at_age; /*! catch_weight_at_age; /*! expected_catch; /** expected_index; /** catch_numbers_at_age; /** catch_weight_at_age; /** *of; @@ -126,18 +126,18 @@ struct Fleet : public fims_model_object::FIMSObject { // derived quantities std::fill(catch_at_age.begin(), catch_at_age.end(), - 0); /*!q = fims_math::exp(this->log_q); for (size_t year = 0; year < this->nyears; year++) { FLEET_LOG << "input F mort " << this->log_Fmort[year] << std::endl; @@ -147,7 +147,7 @@ struct Fleet : public fims_model_object::FIMSObject { } virtual const Type evaluate_age_comp_nll() { - Type nll = 0.0; /*!< The negative log likelihood value */ + Type nll = 0.0; /**< The negative log likelihood value */ #ifdef TMB_MODEL fims_distributions::Dmultinom dmultinom; size_t dims = this->observed_agecomp_data->get_imax() * @@ -197,7 +197,7 @@ struct Fleet : public fims_model_object::FIMSObject { } virtual const Type evaluate_index_nll() { - Type nll = 0.0; /*!< The negative log likelihood value */ + Type nll = 0.0; /**< The negative log likelihood value */ #ifdef TMB_MODEL fims_distributions::Dnorm dnorm; diff --git a/inst/include/population_dynamics/growth/functors/ewaa.hpp b/inst/include/population_dynamics/growth/functors/ewaa.hpp index 92454ac4e..62ff5c5d8 100644 --- a/inst/include/population_dynamics/growth/functors/ewaa.hpp +++ b/inst/include/population_dynamics/growth/functors/ewaa.hpp @@ -26,7 +26,7 @@ struct EWAAgrowth : public GrowthBase { // a map looks up values based on a reference key // in this case, our key is age (first double), and // the value is the weight at that age (second double) - std::map ewaa; /*! ewaa; /** */ EWAAgrowth() : GrowthBase() {} diff --git a/inst/include/population_dynamics/growth/functors/growth_base.hpp b/inst/include/population_dynamics/growth/functors/growth_base.hpp index a6da2de1f..0b2aaabc8 100644 --- a/inst/include/population_dynamics/growth/functors/growth_base.hpp +++ b/inst/include/population_dynamics/growth/functors/growth_base.hpp @@ -22,14 +22,14 @@ namespace fims_popdy { * @brief Base class for all growth functors. * * @tparam Type The type of the growth functor. - * */ + */ template struct GrowthBase : public fims_model_object::FIMSObject { // id_g is the ID of the instance of the growthBase class. // this is like a memory tracker. // Assigning each one its own ID is a way to keep track of // all the instances of the growthBase class. - static uint32_t id_g; /*!< reference id for growth object*/ + static uint32_t id_g; /**< reference id for growth object*/ /** * @brief Constructor. diff --git a/inst/include/population_dynamics/maturity/functors/logistic.hpp b/inst/include/population_dynamics/maturity/functors/logistic.hpp index d17167dd0..619a9ee6f 100644 --- a/inst/include/population_dynamics/maturity/functors/logistic.hpp +++ b/inst/include/population_dynamics/maturity/functors/logistic.hpp @@ -21,9 +21,9 @@ namespace fims_popdy { */ template struct LogisticMaturity : public MaturityBase { - Type inflection_point; /*!< 50% quantile of the value of the quantity of + Type inflection_point; /**< 50% quantile of the value of the quantity of interest (x); e.g. age at which 50% of the fish are mature */ - Type slope; /*!() {} diff --git a/inst/include/population_dynamics/maturity/functors/maturity_base.hpp b/inst/include/population_dynamics/maturity/functors/maturity_base.hpp index 402233dfc..f3f6aadba 100644 --- a/inst/include/population_dynamics/maturity/functors/maturity_base.hpp +++ b/inst/include/population_dynamics/maturity/functors/maturity_base.hpp @@ -29,7 +29,7 @@ struct MaturityBase : public fims_model_object::FIMSObject { // this is like a memory tracker. // Assigning each one its own ID is a way to keep track of // all the instances of the MaturityBase class. - static uint32_t id_g; /*!< The ID of the instance of the MaturityBase class */ + static uint32_t id_g; /**< The ID of the instance of the MaturityBase class */ /** @brief Constructor. */ diff --git a/inst/include/population_dynamics/population/population.hpp b/inst/include/population_dynamics/population/population.hpp index 434dcceff..ff5465b05 100644 --- a/inst/include/population_dynamics/population/population.hpp +++ b/inst/include/population_dynamics/population/population.hpp @@ -35,74 +35,74 @@ directly?) template struct Population : public fims_model_object::FIMSObject { using ParameterVector = - typename fims::ModelTraits::ParameterVector; /*!< the vector of + typename fims::ModelTraits::ParameterVector; /**< the vector of population parameters*/ - static uint32_t id_g; /*!< reference id for population object*/ - size_t nyears; /*!< total number of years in the fishery*/ - size_t nseasons; /*!< total number of seasons in the fishery*/ - size_t nages; /*!< total number of ages in the population*/ - size_t nfleets; /*!< total number of fleets in the fishery*/ + static uint32_t id_g; /**< reference id for population object*/ + size_t nyears; /**< total number of years in the fishery*/ + size_t nseasons; /**< total number of seasons in the fishery*/ + size_t nages; /**< total number of ages in the population*/ + size_t nfleets; /**< total number of fleets in the fishery*/ // constants const Type proportion_female = - 0.5; /*!< Sex proportion fixed at 50/50 for M1*/ + 0.5; /**< Sex proportion fixed at 50/50 for M1*/ // parameters are estimated; after initialize in create_model, push_back to // parameter list - in information.hpp (same for initial F in fleet) - std::vector log_init_naa; /*!< estimated parameter: log numbers at age*/ - ParameterVector log_M; /*!< estimated parameter: log Natural Mortality*/ + std::vector log_init_naa; /**< estimated parameter: log numbers at age*/ + ParameterVector log_M; /**< estimated parameter: log Natural Mortality*/ // Transformed values - std::vector M; /*!< transformed parameter: Natural Mortality*/ + std::vector M; /**< transformed parameter: Natural Mortality*/ - std::vector ages; /*!< vector of the ages for referencing*/ - std::vector years; /*!< vector of years for referencing*/ - ParameterVector mortality_F; /*!< vector of fishing mortality summed across + std::vector ages; /**< vector of the ages for referencing*/ + std::vector years; /**< vector of years for referencing*/ + ParameterVector mortality_F; /**< vector of fishing mortality summed across fleet by year and age*/ std::vector - mortality_Z; /*!< vector of total mortality by year and age*/ + mortality_Z; /**< vector of total mortality by year and age*/ // derived quantities std::vector - weight_at_age; /*!< Derived quantity: expected weight at age */ + weight_at_age; /**< Derived quantity: expected weight at age */ // fecundity removed because we don't need it yet - std::vector numbers_at_age; /*!< Derived quantity: population expected + std::vector numbers_at_age; /**< Derived quantity: population expected numbers at age in each year*/ std::vector - unfished_numbers_at_age; /*!< Derived quantity: population expected + unfished_numbers_at_age; /**< Derived quantity: population expected unfished numbers at age in each year*/ std::vector - biomass; /*!< Derived quantity: total population biomass in each year*/ - std::vector spawning_biomass; /*!< Derived quantity: Spawning_biomass*/ - std::vector unfished_biomass; /*!< Derived quanity + biomass; /**< Derived quantity: total population biomass in each year*/ + std::vector spawning_biomass; /**< Derived quantity: Spawning_biomass*/ + std::vector unfished_biomass; /**< Derived quanity biomass assuming unfished*/ - std::vector unfished_spawning_biomass; /*!< Derived quanity Spawning + std::vector unfished_spawning_biomass; /**< Derived quanity Spawning biomass assuming unfished*/ - std::vector proportion_mature_at_age; /*!< Derived quantity: Proportion + std::vector proportion_mature_at_age; /**< Derived quantity: Proportion matura at age */ - std::vector expected_numbers_at_age; /*!< Expected values: Numbers at + std::vector expected_numbers_at_age; /**< Expected values: Numbers at age (thousands?? millions??) */ - std::vector expected_catch; /*!< Expected values: Catch*/ - std::vector expected_recruitment; /*!< Expected recruitment */ - /// recruitment - int recruitment_id = -999; /*!< id of recruitment model object*/ + std::vector expected_catch; /**< Expected values: Catch*/ + std::vector expected_recruitment; /**< Expected recruitment */ + // recruitment + int recruitment_id = -999; /**< id of recruitment model object*/ std::shared_ptr> - recruitment; /*!< shared pointer to recruitment module */ + recruitment; /**< shared pointer to recruitment module */ // growth - int growth_id = -999; /*!< id of growth model object*/ + int growth_id = -999; /**< id of growth model object*/ std::shared_ptr> - growth; /*!< shared pointer to growth module */ + growth; /**< shared pointer to growth module */ // maturity - int maturity_id = -999; /*!< id of maturity model object*/ + int maturity_id = -999; /**< id of maturity model object*/ std::shared_ptr> - maturity; /*!< shared pointer to maturity module */ + maturity; /**< shared pointer to maturity module */ // fleet - int fleet_id = -999; /*!< id of fleet model object*/ + int fleet_id = -999; /**< id of fleet model object*/ std::vector>> - fleets; /*!< shared pointer to fleet module */ + fleets; /**< shared pointer to fleet module */ // Define objective function object to be able to REPORT and ADREPORT #ifdef TMB_MODEL diff --git a/inst/include/population_dynamics/recruitment/functors/recruitment_base.hpp b/inst/include/population_dynamics/recruitment/functors/recruitment_base.hpp index 7e5f096f8..af1b01716 100644 --- a/inst/include/population_dynamics/recruitment/functors/recruitment_base.hpp +++ b/inst/include/population_dynamics/recruitment/functors/recruitment_base.hpp @@ -1,4 +1,4 @@ -/*! \file recruitment_base.hpp +/** \file recruitment_base.hpp * * This File is part of the NOAA, National Marine Fisheries Service * Fisheries Integrated Modeling System project. See LICENSE in the @@ -29,19 +29,19 @@ namespace fims_popdy { */ template struct RecruitmentBase : public fims_model_object::FIMSObject { - static uint32_t id_g; /*!< reference id for recruitment object*/ + static uint32_t id_g; /**< reference id for recruitment object*/ typename fims::ModelTraits::ParameterVector - recruit_deviations; /*!< A vector of recruitment deviations */ - bool constrain_deviations = false; /*!< A flag to indicate if recruitment + recruit_deviations; /**< A vector of recruitment deviations */ + bool constrain_deviations = false; /**< A flag to indicate if recruitment deviations are summing to zero or not */ - Type log_sigma_recruit; /*!< Log standard deviation of log recruitment + Type log_sigma_recruit; /**< Log standard deviation of log recruitment deviations */ - Type log_rzero; /*!< Log of unexploited recruitment.*/ + Type log_rzero; /**< Log of unexploited recruitment.*/ bool estimate_recruit_deviations = - true; /*!< A flag to indicate if recruitment deviations are estimated or + true; /**< A flag to indicate if recruitment deviations are estimated or not */ /** @brief Constructor. @@ -70,7 +70,7 @@ struct RecruitmentBase : public fims_model_object::FIMSObject { * */ virtual const Type evaluate_nll() { - Type nll = 0.0; /*!< The negative log likelihood value */ + Type nll = 0.0; /**< The negative log likelihood value */ if (!this->estimate_recruit_deviations) { return nll; diff --git a/inst/include/population_dynamics/recruitment/functors/sr_beverton_holt.hpp b/inst/include/population_dynamics/recruitment/functors/sr_beverton_holt.hpp index 781eaa20f..81c4ed8a9 100644 --- a/inst/include/population_dynamics/recruitment/functors/sr_beverton_holt.hpp +++ b/inst/include/population_dynamics/recruitment/functors/sr_beverton_holt.hpp @@ -28,7 +28,7 @@ struct SRBevertonHolt : public RecruitmentBase { // Here we define the members that will be used in the Beverton Holt SR // function. These members are needed by Beverton Holt but will not be common // to all recruitment functions like spawners is below. - Type logit_steep; /*!< Transformed value of recruitment relative to unfished + Type logit_steep; /**< Transformed value of recruitment relative to unfished recruitment at 20% of unfished spawning biomass.*/ SRBevertonHolt() : RecruitmentBase() {} diff --git a/inst/include/population_dynamics/selectivity/functors/double_logistic.hpp b/inst/include/population_dynamics/selectivity/functors/double_logistic.hpp index 51bee5e8a..66d20375a 100644 --- a/inst/include/population_dynamics/selectivity/functors/double_logistic.hpp +++ b/inst/include/population_dynamics/selectivity/functors/double_logistic.hpp @@ -19,16 +19,16 @@ namespace fims_popdy { */ template struct DoubleLogisticSelectivity : public SelectivityBase { - Type inflection_point_asc; /*!< 50% quantile of the value of the quantity of + Type inflection_point_asc; /**< 50% quantile of the value of the quantity of interest (x) on the ascending limb of the double logistic curve; e.g. age at which 50% of the fish are selected */ - Type slope_asc; /*! struct LogisticSelectivity : public SelectivityBase { - Type inflection_point; /*!< 50% quantile of the value of the quantity of + Type inflection_point; /**< 50% quantile of the value of the quantity of interest (x); e.g. age at which 50% of the fish are selected */ - Type slope; /*!() {} diff --git a/inst/include/population_dynamics/selectivity/functors/selectivity_base.hpp b/inst/include/population_dynamics/selectivity/functors/selectivity_base.hpp index a67b9bd8d..2e589adb0 100644 --- a/inst/include/population_dynamics/selectivity/functors/selectivity_base.hpp +++ b/inst/include/population_dynamics/selectivity/functors/selectivity_base.hpp @@ -30,7 +30,7 @@ struct SelectivityBase : public fims_model_object::FIMSObject { // Assigning each one its own ID is a way to keep track of // all the instances of the SelectivityBase class. static uint32_t - id_g; /*!< The ID of the instance of the SelectivityBase class */ + id_g; /**< The ID of the instance of the SelectivityBase class */ /** @brief Constructor. */ diff --git a/inst/include/utilities/fims_json.hpp b/inst/include/utilities/fims_json.hpp index 114528043..c3718928a 100644 --- a/inst/include/utilities/fims_json.hpp +++ b/inst/include/utilities/fims_json.hpp @@ -1,7 +1,9 @@ -/// @file fims_json.hpp -/// @brief A simple JSON parsing and generation library. -/// @details This library provides classes and functions for parsing JSON -/// strings and generating JSON data structures. +/** + * @file fims_json.hpp + * @brief A simple JSON parsing and generation library. + * @details This library provides classes and functions for parsing JSON + * strings and generating JSON data structures. + */ #include #include #include @@ -11,119 +13,131 @@ class JsonValue; -/// Alias for a JSON object, mapping strings to JSON values. +/** + * Alias for a JSON object, mapping strings to JSON values. + */ using JsonObject = std::map; -/// Alias for a JSON array, containing a sequence of JSON values. +/** + * Alias for a JSON array, containing a sequence of JSON values. + */ using JsonArray = std::vector; -/// Represents different types of JSON values. +/** + * Represents different types of JSON values. + */ enum JsonValueType { - Null = 0, ///< Null JSON value. - Number, ///< Numeric JSON value. - String, ///< String JSON value. - Bool, ///< Boolean JSON value. - Object, ///< JSON object. - Array ///< JSON array. + Null = 0, /**< Null JSON value. */ + Number, /**< Numeric JSON value. */ + String, /**< String JSON value. */ + Bool, /**< Boolean JSON value. */ + Object, /**< JSON object. */ + Array /**< JSON array. */ }; -/// Represents a JSON value. +/** + * Represents a JSON value. + */ class JsonValue { public: - /// Default constructor, initializes to Null value. + /** Default constructor, initializes to Null value. */ JsonValue() : type(JsonValueType::Null) {} - /// Constructor for numeric JSON value (i.e., integer). + /** Constructor for numeric JSON value (i.e., integer). */ JsonValue(int num) : type(JsonValueType::Number), number(num) {} - /// Constructor for numeric JSON value (i.e., double). + /** Constructor for numeric JSON value (i.e., double). */ JsonValue(double num) : type(JsonValueType::Number), number(num) {} - /// Constructor for string JSON value. + /** Constructor for string JSON value. */ JsonValue(const std::string& str) : type(JsonValueType::String), str(str) {} - /// Constructor for boolean JSON value. + /** Constructor for boolean JSON value. */ JsonValue(bool b) : type(JsonValueType::Bool), boolean(b) {} - /// Constructor for JSON object value. + /** Constructor for JSON object value. */ JsonValue(const JsonObject& obj) : type(JsonValueType::Object), object(obj) {} - /// Constructor for JSON array value. + /** Constructor for JSON array value. */ JsonValue(const JsonArray& arr) : type(JsonValueType::Array), array(arr) {} - /// Get the type of the JSON value. + /** Get the type of the JSON value. */ JsonValueType GetType() const { return type; } - /// Get the numeric value as an integer. + /** Get the numeric value as an integer. */ int GetInt() const { return static_cast(number); } - /// Get the numeric value as a double. + /** Get the numeric value as a double. */ double GetDouble() const { return number; } - /// Get the string value. + /** Get the string value. */ const std::string& GetString() const { return str; } - /// Get the boolean value. + /** Get the boolean value. */ bool GetBool() const { return boolean; } - /// Get the JSON object. + /** Get the JSON object. */ JsonObject& GetObject() { return object; } - /// Get the JSON array. + /** Get the JSON array. */ JsonArray& GetArray() { return array; } private: - JsonValueType type; ///< Type of the JSON value. - double number; ///< Numeric value. - std::string str; ///< String value. - bool boolean; ///< Boolean value. - JsonObject object; ///< JSON object. - JsonArray array; ///< JSON array. + JsonValueType type; /**< Type of the JSON value. */ + double number; /**< Numeric value. */ + std::string str; /**< String value. */ + bool boolean; /**< Boolean value. */ + JsonObject object; /**< JSON object. */ + JsonArray array; /**< JSON array. */ }; -/// Parses JSON strings and generates JSON values. +/** + * Parses JSON strings and generates JSON values. + */ class JsonParser { public: - /// Parse a JSON string and return the corresponding JSON value. + /** Parse a JSON string and return the corresponding JSON value. */ JsonValue Parse(const std::string& json); - /// Write a JSON value to a file. + /** Write a JSON value to a file. */ void WriteToFile(const std::string& filename, JsonValue jsonValue); - /// Display a JSON value to the standard output. + /** Display a JSON value to the standard output. */ void Show(JsonValue jsonValue); private: - /// Skip whitespace characters in the input string. + /** Skip whitespace characters in the input string. */ void SkipWhitespace(); - /// Parse a JSON value. + /** Parse a JSON value. */ JsonValue ParseValue(); - /// Parse a numeric JSON value. + /** Parse a numeric JSON value. */ JsonValue ParseNumber(); - /// Parse a string JSON value. + /** Parse a string JSON value. */ JsonValue ParseString(); - /// Parse a boolean JSON value. + /** Parse a boolean JSON value. */ JsonValue ParseBool(); - /// Parse a null JSON value. + /** Parse a null JSON value. */ JsonValue ParseNull(); - /// Parse a JSON object. + /** Parse a JSON object. */ JsonValue ParseObject(); - /// Parse a JSON array. + /** Parse a JSON array. */ JsonValue ParseArray(); - /// Write a JSON value to an output file stream. + /** Write a JSON value to an output file stream. */ void WriteJsonValue(std::ofstream& outputFile, JsonValue jsonValue); - /// Display a JSON value to an output stream. + /** Display a JSON value to an output stream. */ void PrintJsonValue(std::ostream& outputFile, JsonValue jsonValue); - /// Indentation helper for printing JSON values in an output file stream. + /** Indentation helper for printing JSON values in an output file stream. */ void Indent(std::ostream& outputFile, int level); - /// Indentation helper for printing JSON values in an output stream. + /** Indentation helper for printing JSON values in an output stream. */ void Indent(std::ofstream& outputFile, int level); - std::string data; ///< Input JSON data. - size_t position; ///< Current position in the data. + std::string data; /**< Input JSON data. */ + size_t position; /**< Current position in the data. */ }; -/// Parse a JSON string and return the corresponding JSON value. -/// @param json The JSON string to parse. -/// @return The parsed JSON value. +/** + * Parse a JSON string and return the corresponding JSON value. + * @param json The JSON string to parse. + * @return The parsed JSON value. + */ JsonValue JsonParser::Parse(const std::string& json) { data = json; position = 0; @@ -136,10 +150,12 @@ void JsonParser::SkipWhitespace() { } } -/// Parse a JSON value. -/// @return The parsed JSON value. +/** + * Parse a JSON value. + * @return The parsed JSON value. + */ JsonValue JsonParser::ParseValue() { - /// Skip whitespace characters in the input string. + /** Skip whitespace characters in the input string. */ SkipWhitespace(); char current = data[position]; if (current == '{') { @@ -157,8 +173,10 @@ JsonValue JsonParser::ParseValue() { } } -/// Parse a numeric JSON value. -/// @return The parsed JSON value. +/** + * Parse a numeric JSON value. + * @return The parsed JSON value. + */ JsonValue JsonParser::ParseNumber() { size_t end_pos = position; bool is_float = false; @@ -186,8 +204,10 @@ JsonValue JsonParser::ParseNumber() { } } -/// Parse a string JSON value. -/// @return The parsed JSON value. +/** + * Parse a string JSON value. + * @return The parsed JSON value. + */ JsonValue JsonParser::ParseString() { position++; // Skip the initial '"' size_t end_pos = data.find('"', position); @@ -196,8 +216,10 @@ JsonValue JsonParser::ParseString() { return JsonValue(str); } -/// Parse a boolean JSON value. -/// @return The parsed JSON value. +/** + * Parse a boolean JSON value. + * @return The parsed JSON value. + */ JsonValue JsonParser::ParseBool() { if (data.compare(position, 4, "true") == 0) { position += 4; @@ -211,8 +233,10 @@ JsonValue JsonParser::ParseBool() { } } -/// Parse a null JSON value. -/// @return The parsed JSON value. +/** + * Parse a null JSON value. + * @return The parsed JSON value. + */ JsonValue JsonParser::ParseNull() { if (data.compare(position, 4, "null") == 0) { position += 4; @@ -223,8 +247,10 @@ JsonValue JsonParser::ParseNull() { } } -/// Parse a JSON object. -/// @return The parsed JSON value representing the object. +/** + * Parse a JSON object. + * @return The parsed JSON value representing the object. + */ JsonValue JsonParser::ParseObject() { JsonObject obj; position++; // Skip the initial '{' @@ -248,8 +274,10 @@ JsonValue JsonParser::ParseObject() { return JsonValue(obj); } -/// Parse a JSON array. -/// @return The parsed JSON value representing the array. +/** + * Parse a JSON array. + * @return The parsed JSON value representing the array. + */ JsonValue JsonParser::ParseArray() { JsonArray arr; position++; // Skip the initial '[' @@ -269,9 +297,11 @@ JsonValue JsonParser::ParseArray() { return JsonValue(arr); } -/// Write a JSON value to an output file. -/// @param filename The name of the output file. -/// @param jsonValue The JSON value to write. +/** + * Write a JSON value to an output file. + * @param filename The name of the output file. + * @param jsonValue The JSON value to write. + */ void JsonParser::WriteToFile(const std::string& filename, JsonValue jsonValue) { std::ofstream outputFile(filename); if (!outputFile) { @@ -280,14 +310,16 @@ void JsonParser::WriteToFile(const std::string& filename, JsonValue jsonValue) { return; } - // Call a private helper function to write JSON values recursively + /** Call a private helper function to write JSON values recursively */ WriteJsonValue(outputFile, jsonValue); } -/// Write a JSON value to an output file. -// Private helper function to write JSON values recursively -/// @param outputFile The output file stream. -/// @param jsonValue The JSON value to write. +/** + * Write a JSON value to an output file. + * Private helper function to write JSON values recursively + * @param outputFile The output file stream. + * @param jsonValue The JSON value to write. + */ void JsonParser::WriteJsonValue(std::ofstream& outputFile, JsonValue jsonValue) { switch (jsonValue.GetType()) { @@ -333,16 +365,20 @@ void JsonParser::WriteJsonValue(std::ofstream& outputFile, } } -/// Display a JSON value to the standard output. -/// @param jsonValue The JSON value to display. +/** + * Display a JSON value to the standard output. + * @param jsonValue The JSON value to display. + */ void JsonParser::Show(JsonValue jsonValue) { this->PrintJsonValue(std::cout, jsonValue); std::cout << std::endl; } -/// Display a JSON value to an output stream. -/// @param output The output stream. -/// @param jsonValue The JSON value to display. +/** + * Display a JSON value to an output stream. + * @param output The output stream. + * @param jsonValue The JSON value to display. + */ void JsonParser::PrintJsonValue(std::ostream& output, JsonValue jsonValue) { switch (jsonValue.GetType()) { case JsonValueType::Null: diff --git a/inst/templates/module_base_template.hpp b/inst/templates/module_base_template.hpp index 150ed17ba..ee83ca648 100644 --- a/inst/templates/module_base_template.hpp +++ b/inst/templates/module_base_template.hpp @@ -22,7 +22,7 @@ namespace fims_popdy { /* @brief Base class for all {{{ module_type }}} functors. * * @tparam Type The type of the {{{ module_type }}} functor. - * */ + */ template // Change {{{ module_type }}} to CamelCase in the class definition below. struct {{{ module_type }}}Base : public fims_model_object::FIMSObject { diff --git a/vignettes/fims-path-maturity.Rmd b/vignettes/fims-path-maturity.Rmd index 04e433431..2708c9a88 100644 --- a/vignettes/fims-path-maturity.Rmd +++ b/vignettes/fims-path-maturity.Rmd @@ -297,9 +297,9 @@ namespace fims_popdy { */ template struct LogisticMaturity : public MaturityBase { - Type inflection_point; /*!< 50% quantile of the value of the quantity of interest (x); e.g., + Type inflection_point; /**< 50% quantile of the value of the quantity of interest (x); e.g., age at which 50% of the fish are mature */ - Type slope; /*!() {} @@ -332,9 +332,9 @@ To evaluate maturity within the `Population` class, we first need to set up a sh ```{Rcpp, class.source = "fimschunk", eval = FALSE} //file: inst/include/population_dynamics/population/population.hpp // maturity is a shared pointer to MaturityBase -int maturity_id = -999; /*!< id of maturity model object*/ +int maturity_id = -999; /**< id of maturity model object*/ std::shared_ptr> - maturity; /*!< shared pointer to maturity module */ + maturity; /**< shared pointer to maturity module */ ``` The `maturity_id` was set from R using the `SetMaturity()` method from the `PopulationInterface` class: @@ -359,7 +359,7 @@ struct MaturityBase : public fims_model_object::FIMSObject { // this is like a memory tracker. // Assigning each one its own ID is a way to keep track of // all the instances of the MaturityBase class. - static uint32_t id_g; /*!< The ID of the instance of the MaturityBase class */ + static uint32_t id_g; /**< The ID of the instance of the MaturityBase class */ /** @brief Constructor. */ @@ -418,7 +418,7 @@ This *information* is managed in FIMS through the `Information` class in [inform maturity_models, that points to fims_popdy::MaturityBase */ std::map > > - maturity_models; /*! > > - populations; /*! > >::iterator