FIMS  v0.8.0
Loading...
Searching...
No Matches
EWAAGrowthInterface Class Reference

Rcpp interface for EWAAGrowth to instantiate the object from R: ewaa <- methods::new(EWAAGrowth). Where, EWAA stands for empirical weight at age and growth is not actually estimated. More...

#include <rcpp_growth.hpp>

Inheritance diagram for EWAAGrowthInterface:
GrowthInterfaceBase FIMSRcppInterfaceBase

Public Member Functions

 EWAAGrowthInterface ()
 The constructor.
 
 EWAAGrowthInterface (const EWAAGrowthInterface &other)
 Construct a new EWAAGrowthInterface object.
 
virtual ~EWAAGrowthInterface ()
 The destructor.
 
virtual uint32_t get_id ()
 Gets the ID of the interface base object.
 
std::map< double, doublemake_map (RealVector ages, RealVector weights)
 Create a map of input numeric vectors.
 
virtual double evaluate (double age)
 Evaluate the growth using empirical weight at age.
 
virtual std::string to_json ()
 Converts the data to json representation for the output.
 
- Public Member Functions inherited from GrowthInterfaceBase
 GrowthInterfaceBase ()
 The constructor.
 
 GrowthInterfaceBase (const GrowthInterfaceBase &other)
 Construct a new Growth Interface Base object.
 
virtual ~GrowthInterfaceBase ()
 The destructor.
 
- 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.
 
void get_se_values (std::string name, std::map< std::string, std::vector< double > > &se_values, fims::Vector< double > &values)
 Method to extract standard error values from the se_values working map.
 
virtual void set_uncertainty (std::map< std::string, std::vector< double > > &se_values)
 Set uncertainty values for the interface 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

RealVector weights
 Weights (mt) for each age class.
 
RealVector ages
 Ages (years) for each age class.
 
std::shared_ptr< std::map< double, double > > ewaa
 A map of empirical weight-at-age values allowing multiple modules to access and modify the weights without copying values between modules.
 
bool initialized = false
 Have weight and age vectors been set? The default is false.
 
- Public Attributes inherited from GrowthInterfaceBase
uint32_t id
 The local id of the GrowthInterfaceBase object.
 
- Public Attributes inherited from FIMSRcppInterfaceBase
bool finalized = false
 Is the object already finalized? The default is false.
 

Additional Inherited Members

- Static Public Attributes inherited from GrowthInterfaceBase
static uint32_t id_g = 1
 The static id of the GrowthInterfaceBase object.
 
static std::map< uint32_t, std::shared_ptr< GrowthInterfaceBase > > live_objects
 The map associating the IDs of GrowthInterfaceBase 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.
 

Detailed Description

Rcpp interface for EWAAGrowth to instantiate the object from R: ewaa <- methods::new(EWAAGrowth). Where, EWAA stands for empirical weight at age and growth is not actually estimated.

Constructor & Destructor Documentation

◆ EWAAGrowthInterface()

EWAAGrowthInterface::EWAAGrowthInterface ( const EWAAGrowthInterface other)
inline

Construct a new EWAAGrowthInterface object.

Parameters
other

Member Function Documentation

◆ evaluate()

virtual double EWAAGrowthInterface::evaluate ( double  age)
inlinevirtual

Evaluate the growth using empirical weight at age.

Parameters
ageThe age at of the individual to evaluate weight.

This can be called from R using ewaagrowth.evaluate(age).

Implements GrowthInterfaceBase.

◆ get_id()

virtual uint32_t EWAAGrowthInterface::get_id ( )
inlinevirtual

Gets the ID of the interface base object.

Returns
The ID.

Implements GrowthInterfaceBase.

◆ make_map()

std::map< double, double > EWAAGrowthInterface::make_map ( RealVector  ages,
RealVector  weights 
)
inline

Create a map of input numeric vectors.

Parameters
weightsType vector of weights.
agesType vector of ages.
Returns
std::map<T, T>.

◆ to_json()

virtual std::string EWAAGrowthInterface::to_json ( )
inlinevirtual

Converts the data to json representation for the output.

Returns
A string is returned specifying that the module relates to the growth interface with empirical weight at age. It also returns the ID, the rank of 1, the dimensions, age bins, and the calculated values themselves. This string is formatted for a json file.

Reimplemented from FIMSRcppInterfaceBase.


The documentation for this class was generated from the following file: