![]() |
FIMS
v0.9.2
|
The FisheryModelInterfaceBase class is the base class for all fishery models in the FIMS Rcpp interface. It inherits from the FIMSRcppInterfaceBase. More...
#include <rcpp_models.hpp>
Public Member Functions | |
| FisheryModelInterfaceBase () | |
| The constructor. | |
| FisheryModelInterfaceBase (const FisheryModelInterfaceBase &other) | |
| Construct a new Data Interface Base object. | |
| virtual | ~FisheryModelInterfaceBase () |
| The destructor. | |
| virtual std::string | to_json () |
| Serialize the fishery model to a JSON string. | |
| virtual uint32_t | get_id ()=0 |
| Get the ID for the child fleet interface objects to inherit. | |
| Rcpp::NumericVector | get_fixed_parameters_vector () |
| Get the vector of fixed effect parameters for the model. | |
| Rcpp::NumericVector | get_random_parameters_vector () |
| Get the vector of random effect parameters for the model. | |
| double | sum (const std::valarray< double > &v) |
| Sum method to calculate the sum of an array or vector of doubles. | |
| double | sum (const std::vector< double > &v) |
| Sum method for a vector of doubles. | |
| double | min (const std::valarray< double > &v) |
| Minimum method to calculate the minimum of an array or vector of doubles. | |
| std::valarray< double > | fabs (const std::valarray< double > &v) |
| A function to compute the absolute value of a value array of floating-point values. It is a wrapper around std::fabs. | |
Public Member Functions inherited from FIMSRcppInterfaceBase | |
| virtual bool | add_to_fims_tmb () |
| A virtual method to inherit to add objects to the TMB model. | |
| virtual void | finalize () |
| Extracts derived quantities back to the Rcpp interface object from the Information object. | |
| std::string | value_to_string (double value) |
| Report the parameter value as a string. | |
| std::string | make_dimensions (uint32_t start, uint32_t end, uint32_t rep=1) |
| Make a string of dimensions for the model. | |
Public Attributes | |
| uint32_t | id |
| The local id of the FleetInterfaceBase object. | |
Public Attributes inherited from FIMSRcppInterfaceBase | |
| bool | finalized = false |
| Is the object already finalized? The default is false. | |
Static Public Attributes | |
| static uint32_t | id_g = 1 |
| The static id of the FleetInterfaceBase object. | |
| static std::map< uint32_t, std::shared_ptr< FisheryModelInterfaceBase > > | live_objects |
| The map associating the IDs of FleetInterfaceBase to the objects. This is a live object, which is an object that has been created and lives in memory. | |
Static Public Attributes inherited from FIMSRcppInterfaceBase | |
| static std::vector< std::shared_ptr< FIMSRcppInterfaceBase > > | fims_interface_objects |
| FIMS interface object vectors. | |
Protected Types | |
| typedef std::set< uint32_t >::iterator | population_id_iterator |
| Iterator for population ids. | |
Protected Attributes | |
| std::shared_ptr< std::set< uint32_t > > | population_ids |
| The set of population ids that this fishery model operates on. | |
The FisheryModelInterfaceBase class is the base class for all fishery models in the FIMS Rcpp interface. It inherits from the FIMSRcppInterfaceBase.
|
inline |
Construct a new Data Interface Base object.
| other |
A function to compute the absolute value of a value array of floating-point values. It is a wrapper around std::fabs.
| v | A value array of floating-point values, where floating-point values is anything with decimals. |
|
inline |
Get the vector of fixed effect parameters for the model.
Returns a numeric vector containing the fixed effect parameters used in the model.
Get the ID for the child fleet interface objects to inherit.
Implemented in CatchAtAgeInterface.
|
inline |
Get the vector of random effect parameters for the model.
Returns a numeric vector containing the random effect parameters used in the model.
Minimum method to calculate the minimum of an array or vector of doubles.
| v |
Sum method to calculate the sum of an array or vector of doubles.
| v |
Sum method for a vector of doubles.
| v |
|
inlinevirtual |
Serialize the fishery model to a JSON string.
This method provides a standardized interface for converting the state of a fishery model into a JSON-formatted string. The JSON output is intended for use in reporting, diagnostics, or data exchange between C++ and R. Derived classes should override this method to provide model-specific serialization logic.
Reimplemented from FIMSRcppInterfaceBase.
Reimplemented in CatchAtAgeInterface.