9#ifndef FIMS_INTERFACE_RCPP_RCPP_OBJECTS_RCPP_SELECTIVITY_HPP
10#define FIMS_INTERFACE_RCPP_RCPP_OBJECTS_RCPP_SELECTIVITY_HPP
34 static std::map<uint32_t, std::shared_ptr<SelectivityInterfaceBase>>
93 std::make_shared<LogisticSelectivityInterface>(*
this);
127 LogisticSel.
inflection_point[0] = this->inflection_point[0].initial_value_m;
128 LogisticSel.
slope.resize(1);
129 LogisticSel.
slope[0] = this->slope[0].initial_value_m;
141 " has been finalized already.");
146 std::shared_ptr<fims_info::Information<double>> info =
156 " not found in Information.");
159 std::shared_ptr<fims_popdy::LogisticSelectivity<double>> sel =
160 std::dynamic_pointer_cast<fims_popdy::LogisticSelectivity<double>>(
164 if (this->inflection_point[i].estimation_type_m.
get() ==
"constant") {
165 this->inflection_point[i].final_value_m =
166 this->inflection_point[i].initial_value_m;
168 this->inflection_point[i].final_value_m = sel->inflection_point[i];
172 for (
size_t i = 0; i <
slope.
size(); i++) {
173 if (this->slope[i].estimation_type_m.
get() ==
"constant") {
174 this->slope[i].final_value_m = this->slope[i].initial_value_m;
176 this->slope[i].final_value_m = sel->slope[i];
189 std::stringstream ss;
192 ss <<
" \"module_name\":\"Selectivity\",\n";
193 ss <<
" \"module_type\": \"Logistic\",\n";
194 ss <<
" \"module_id\": " << this->
id <<
",\n";
196 ss <<
" \"parameters\": [\n{\n";
197 ss <<
" \"name\": \"inflection_point\",\n";
198 ss <<
" \"id\":" << this->inflection_point.
id_m <<
",\n";
199 ss <<
" \"type\": \"vector\",\n";
200 ss <<
" \"dimensionality\": {\n";
201 ss <<
" \"header\": [null],\n";
202 ss <<
" \"dimensions\": [1]\n},\n";
203 ss <<
" \"values\":" << this->inflection_point <<
"},\n ";
206 ss <<
" \"name\": \"slope\",\n";
207 ss <<
" \"id\":" << this->slope.
id_m <<
",\n";
208 ss <<
" \"type\": \"vector\",\n";
209 ss <<
" \"dimensionality\": {\n";
210 ss <<
" \"header\": [null],\n";
211 ss <<
" \"dimensions\": [1]\n},\n";
212 ss <<
" \"values\":" << this->slope <<
"}]\n";
221 template <
typename Type>
222 bool add_to_fims_tmb_internal() {
223 std::shared_ptr<fims_info::Information<Type>> info =
226 std::shared_ptr<fims_popdy::LogisticSelectivity<Type>> selectivity =
227 std::make_shared<fims_popdy::LogisticSelectivity<Type>>();
228 std::stringstream ss;
230 selectivity->id = this->
id;
231 selectivity->inflection_point.resize(this->inflection_point.
size());
232 for (
size_t i = 0; i < this->inflection_point.
size(); i++) {
233 selectivity->inflection_point[i] =
234 this->inflection_point[i].initial_value_m;
235 if (this->inflection_point[i].estimation_type_m.
get() ==
238 ss <<
"Selectivity." << this->
id <<
".inflection_point."
239 << this->inflection_point[i].
id_m;
240 info->RegisterParameterName(ss.str());
241 info->RegisterParameter(selectivity->inflection_point[i]);
243 if (this->inflection_point[i].estimation_type_m.
get() ==
246 ss <<
"Selectivity." << this->
id <<
".inflection_point."
247 << this->inflection_point[i].
id_m;
248 info->RegisterRandomEffect(selectivity->inflection_point[i]);
249 info->RegisterRandomEffectName(ss.str());
252 info->variable_map[this->inflection_point.
id_m] =
255 selectivity->slope.
resize(this->slope.
size());
256 for (
size_t i = 0; i < this->slope.
size(); i++) {
257 selectivity->slope[i] = this->slope[i].initial_value_m;
258 if (this->slope[i].estimation_type_m.
get() ==
"fixed_effects") {
260 ss <<
"Selectivity." << this->
id <<
".slope." << this->slope[i].
id_m;
261 info->RegisterParameterName(ss.str());
262 info->RegisterParameter(selectivity->slope[i]);
264 if (this->slope[i].estimation_type_m.
get() ==
"random_effects") {
266 ss <<
"Selectivity." << this->
id <<
".slope." << this->slope[i].
id_m;
267 info->RegisterRandomEffectName(ss.str());
268 info->RegisterRandomEffect(selectivity->slope[i]);
271 info->variable_map[this->slope.
id_m] = &(selectivity)->
slope;
274 info->selectivity_models[selectivity->id] = selectivity;
284 this->add_to_fims_tmb_internal<TMB_FIMS_REAL_TYPE>();
285 this->add_to_fims_tmb_internal<TMBAD_FIMS_TYPE>();
319 std::make_shared<DoubleLogisticSelectivityInterface>(*
this);
350 this->inflection_point_asc[0].initial_value_m;
352 DoubleLogisticSel.
slope_asc[0] = this->slope_asc[0].initial_value_m;
355 this->inflection_point_desc[0].initial_value_m;
357 DoubleLogisticSel.
slope_desc[0] = this->slope_desc[0].initial_value_m;
358 return DoubleLogisticSel.
evaluate(x);
368 fims::to_string(this->
id) +
369 " has been finalized already.");
374 std::shared_ptr<fims_info::Information<double>> info =
384 fims::to_string(this->
id) +
385 " not found in Information.");
388 std::shared_ptr<fims_popdy::DoubleLogisticSelectivity<double>> sel =
389 std::dynamic_pointer_cast<
393 if (this->inflection_point_asc[i].estimation_type_m.
get() ==
395 this->inflection_point_asc[i].final_value_m =
396 this->inflection_point_asc[i].initial_value_m;
398 this->inflection_point_asc[i].final_value_m =
399 sel->inflection_point_asc[i];
404 if (this->slope_asc[i].estimation_type_m.
get() ==
"constant") {
405 this->slope_asc[i].final_value_m = this->slope_asc[i].initial_value_m;
407 this->slope_asc[i].final_value_m = sel->slope_asc[i];
412 if (this->inflection_point_desc[i].estimation_type_m.
get() ==
414 this->inflection_point_desc[i].final_value_m =
415 this->inflection_point_desc[i].initial_value_m;
417 this->inflection_point_desc[i].final_value_m =
418 sel->inflection_point_desc[i];
423 if (this->slope_desc[i].estimation_type_m.
get() ==
"constant") {
424 this->slope_desc[i].final_value_m =
425 this->slope_desc[i].initial_value_m;
427 this->slope_desc[i].final_value_m = sel->slope_desc[i];
437 std::stringstream ss;
440 ss <<
" \"module_name\": \"Selectivity\",\n";
441 ss <<
" \"module_type\": \"DoubleLogistic\",\n";
442 ss <<
" \"module_id\": " << this->
id <<
",\n";
444 ss <<
" \"parameters\":[\n{\n";
445 ss <<
" \"name\": \"inflection_point_asc\",\n";
446 ss <<
" \"id\":" << this->inflection_point_asc.
id_m <<
",\n";
447 ss <<
" \"type\": \"vector\",\n";
448 ss <<
" \"dimensionality\": {\n";
449 ss <<
" \"header\": [null],\n";
450 ss <<
" \"dimensions\": [1]\n},\n";
451 ss <<
" \"values\":" << this->inflection_point_asc <<
"},\n";
454 ss <<
" \"name\": \"slope_asc\",\n";
455 ss <<
" \"id\":" << this->slope_asc.
id_m <<
",\n";
456 ss <<
" \"type\": \"vector\",\n";
457 ss <<
" \"dimensionality\": {\n";
458 ss <<
" \"header\": [null],\n";
459 ss <<
" \"dimensions\": [1]\n},\n";
460 ss <<
" \"values\":" << this->slope_asc <<
"},\n";
463 ss <<
" \"name\": \"inflection_point_desc\",\n";
464 ss <<
" \"id\":" << this->inflection_point_desc.
id_m <<
",\n";
465 ss <<
" \"type\": \"vector\",\n";
466 ss <<
" \"dimensionality\": {\n";
467 ss <<
" \"header\": [null],\n";
468 ss <<
" \"dimensions\": [1]\n},\n";
469 ss <<
" \"values\":" << this->inflection_point_desc <<
"},\n";
472 ss <<
" \"name\": \"slope_desc\",\n";
473 ss <<
" \"id\":" << this->slope_desc.
id_m <<
",\n";
474 ss <<
" \"type\": \"vector\",\n";
475 ss <<
" \"dimensionality\": {\n";
476 ss <<
" \"header\": [null],\n";
477 ss <<
" \"dimensions\": [1]\n},\n";
478 ss <<
" \"values\":" << this->slope_desc <<
"}]\n";
487 template <
typename Type>
488 bool add_to_fims_tmb_internal() {
489 std::shared_ptr<fims_info::Information<Type>> info =
492 std::shared_ptr<fims_popdy::DoubleLogisticSelectivity<Type>> selectivity =
493 std::make_shared<fims_popdy::DoubleLogisticSelectivity<Type>>();
495 std::stringstream ss;
497 selectivity->id = this->
id;
498 selectivity->inflection_point_asc.resize(this->inflection_point_asc.
size());
499 for (
size_t i = 0; i < this->inflection_point_asc.
size(); i++) {
500 selectivity->inflection_point_asc[i] =
501 this->inflection_point_asc[i].initial_value_m;
502 if (this->inflection_point_asc[i].estimation_type_m.
get() ==
505 ss <<
"Selectivity." << this->
id <<
".inflection_point_asc."
506 << this->inflection_point_asc[i].
id_m;
507 info->RegisterParameterName(ss.str());
508 info->RegisterParameter(selectivity->inflection_point_asc[i]);
510 if (this->inflection_point_asc[i].estimation_type_m.
get() ==
513 ss <<
"Selectivity." << this->
id <<
".inflection_point_asc."
514 << this->inflection_point_asc[i].
id_m;
515 info->RegisterRandomEffectName(ss.str());
516 info->RegisterRandomEffect(selectivity->inflection_point_asc[i]);
519 info->variable_map[this->inflection_point_asc.
id_m] =
522 selectivity->slope_asc.
resize(this->slope_asc.
size());
523 for (
size_t i = 0; i < this->slope_asc.
size(); i++) {
524 selectivity->slope_asc[i] = this->slope_asc[i].initial_value_m;
526 if (this->slope_asc[i].estimation_type_m.
get() ==
"fixed_effects") {
528 ss <<
"Selectivity." << this->
id <<
".slope_asc."
529 << this->slope_asc[i].
id_m;
530 info->RegisterParameterName(ss.str());
531 info->RegisterParameter(selectivity->slope_asc[i]);
533 if (this->slope_asc[i].estimation_type_m.
get() ==
"random_effects") {
535 ss <<
"Selectivity." << this->
id <<
".slope_asc."
536 << this->slope_asc[i].
id_m;
537 info->RegisterRandomEffectName(ss.str());
538 info->RegisterRandomEffect(selectivity->slope_asc[i]);
541 info->variable_map[this->slope_asc.
id_m] = &(selectivity)->
slope_asc;
543 selectivity->inflection_point_desc.
resize(
544 this->inflection_point_desc.
size());
545 for (
size_t i = 0; i < this->inflection_point_desc.
size(); i++) {
546 selectivity->inflection_point_desc[i] =
547 this->inflection_point_desc[i].initial_value_m;
549 if (this->inflection_point_desc[i].estimation_type_m.
get() ==
552 ss <<
"Selectivity." << this->
id <<
".inflection_point_desc."
553 << this->inflection_point_desc[i].
id_m;
554 info->RegisterParameterName(ss.str());
555 info->RegisterParameter(selectivity->inflection_point_desc[i]);
557 if (this->inflection_point_desc[i].estimation_type_m.
get() ==
560 ss <<
"Selectivity." << this->
id <<
".inflection_point_desc."
561 << this->inflection_point_desc[i].
id_m;
562 info->RegisterRandomEffectName(ss.str());
563 info->RegisterRandomEffect(selectivity->inflection_point_desc[i]);
566 info->variable_map[this->inflection_point_desc.
id_m] =
569 selectivity->slope_desc.
resize(this->slope_desc.
size());
570 for (
size_t i = 0; i < this->slope_desc.
size(); i++) {
571 selectivity->slope_desc[i] = this->slope_desc[i].initial_value_m;
573 if (this->slope_desc[i].estimation_type_m.
get() ==
"fixed_effects") {
575 ss <<
"Selectivity." << this->
id <<
".slope_desc."
576 << this->slope_desc[i].
id_m;
577 info->RegisterParameterName(ss.str());
578 info->RegisterParameter(selectivity->slope_desc[i]);
580 if (this->slope_desc[i].estimation_type_m.
get() ==
"random_effects") {
582 ss <<
"Selectivity." << this->
id <<
".slope_desc."
583 << this->slope_desc[i].
id_m;
584 info->RegisterRandomEffectName(ss.str());
585 info->RegisterRandomEffect(selectivity->slope_desc[i]);
589 info->variable_map[this->slope_desc.
id_m] = &(selectivity)->
slope_desc;
592 info->selectivity_models[selectivity->id] = selectivity;
602 this->add_to_fims_tmb_internal<TMB_FIMS_REAL_TYPE>();
603 this->add_to_fims_tmb_internal<TMBAD_FIMS_TYPE>();
640 std::make_shared<AgeSpecificSelectivityInterface>(*
this);
675 AgeSpecificSel.
n_ages = this->n_ages.
get();
676 if (this->ages.
size() > 0) {
677 AgeSpecificSel.
min_age =
static_cast<size_t>(*std::min_element(
678 this->ages.
storage_m->begin(), this->ages.storage_m->end()));
680 AgeSpecificSel.
min_age =
static_cast<size_t>(this->min_age.
get());
683 for (
size_t i = 0; i < this->logit_sel_at_age.
size(); i++) {
685 this->logit_sel_at_age[i].initial_value_m;
698 " has been finalized already.");
703 std::shared_ptr<fims_info::Information<double>> info =
713 " not found in Information.");
716 std::shared_ptr<fims_popdy::AgeSpecificSelectivity<double>> sel =
717 std::dynamic_pointer_cast<fims_popdy::AgeSpecificSelectivity<double>>(
720 if (this->logit_sel_at_age[i].estimation_type_m.
get() ==
"constant") {
721 this->logit_sel_at_age[i].final_value_m =
722 this->logit_sel_at_age[i].initial_value_m;
724 this->logit_sel_at_age[i].final_value_m = sel->logit_sel_at_age[i];
737 std::stringstream ss;
740 ss <<
" \"module_name\":\"Selectivity\",\n";
741 ss <<
" \"module_type\": \"AgeSpecific\",\n";
742 ss <<
" \"module_id\": " << this->
id <<
",\n";
744 ss <<
" \"parameters\": [\n{\n";
745 ss <<
" \"name\": \"logit_sel_at_age\",\n";
746 ss <<
" \"id\":" << this->logit_sel_at_age.
id_m <<
",\n";
747 ss <<
" \"type\": \"vector\",\n";
748 ss <<
" \"dimensionality\": {\n";
749 ss <<
" \"header\": [\"n_ages\"],\n";
750 ss <<
" \"dimensions\": [" << this->n_ages.
get() <<
"]\n},\n";
751 ss <<
" \"values\":" << this->logit_sel_at_age <<
"}]\n";
760 template <
typename Type>
761 bool add_to_fims_tmb_internal() {
762 std::shared_ptr<fims_info::Information<Type>> info =
765 std::shared_ptr<fims_popdy::AgeSpecificSelectivity<Type>> selectivity =
766 std::make_shared<fims_popdy::AgeSpecificSelectivity<Type>>();
767 std::stringstream ss;
769 selectivity->id = this->
id;
770 selectivity->n_ages = this->n_ages.
get();
771 if (this->ages.
size() > 0) {
772 selectivity->min_age =
static_cast<size_t>(*std::min_element(
773 this->ages.
storage_m->begin(), this->ages.storage_m->end()));
775 selectivity->min_age =
static_cast<size_t>(this->min_age.
get());
777 selectivity->logit_sel_at_age.resize(this->logit_sel_at_age.
size());
778 for (
size_t i = 0; i < this->logit_sel_at_age.
size(); i++) {
779 selectivity->logit_sel_at_age[i] =
780 this->logit_sel_at_age[i].initial_value_m;
781 if (this->logit_sel_at_age[i].estimation_type_m.
get() ==
784 ss <<
"Selectivity." << this->
id <<
".logit_sel_at_age."
785 << this->logit_sel_at_age[i].
id_m;
786 info->RegisterParameterName(ss.str());
787 info->RegisterParameter(selectivity->logit_sel_at_age[i]);
789 if (this->logit_sel_at_age[i].estimation_type_m.
get() ==
792 ss <<
"Selectivity." << this->
id <<
".logit_sel_at_age."
793 << this->logit_sel_at_age[i].
id_m;
794 info->RegisterRandomEffect(selectivity->logit_sel_at_age[i]);
795 info->RegisterRandomEffectName(ss.str());
798 info->variable_map[this->logit_sel_at_age.
id_m] =
802 info->selectivity_models[selectivity->id] = selectivity;
812 this->add_to_fims_tmb_internal<TMB_FIMS_REAL_TYPE>();
813 this->add_to_fims_tmb_internal<TMBAD_FIMS_TYPE>();
Rcpp interface for selectivity_at_age to instantiate the object from R: selectivity_at_age <- methods...
Definition rcpp_selectivity.hpp:616
VariableVector logit_sel_at_age
Age-specific selectivity parameter values.
Definition rcpp_selectivity.hpp:633
virtual ~AgeSpecificSelectivityInterface()
The destructor.
Definition rcpp_selectivity.hpp:660
virtual uint32_t get_id()
Gets the ID of the interface base object.
Definition rcpp_selectivity.hpp:666
SharedInt n_ages
The number of age bins.
Definition rcpp_selectivity.hpp:621
virtual void finalize()
Extracts derived quantities back to the Rcpp interface object from the Information object.
Definition rcpp_selectivity.hpp:694
AgeSpecificSelectivityInterface()
The constructor.
Definition rcpp_selectivity.hpp:638
virtual double evaluate(double x)
Evaluate selectivity using fims_math::inv_logit.
Definition rcpp_selectivity.hpp:673
RealVector ages
Vector of ages.
Definition rcpp_selectivity.hpp:625
virtual std::string to_json()
Converts the data to json representation for the output.
Definition rcpp_selectivity.hpp:736
AgeSpecificSelectivityInterface(const AgeSpecificSelectivityInterface &other)
Construct a new Selectivity-at-age Interface object.
Definition rcpp_selectivity.hpp:650
SharedInt min_age
Minimum observed age.
Definition rcpp_selectivity.hpp:629
Rcpp interface for logistic selectivity as an S4 object. To instantiate from R: logistic_selectivity ...
Definition rcpp_selectivity.hpp:298
DoubleLogisticSelectivityInterface(const DoubleLogisticSelectivityInterface &other)
Construct a new Double Logistic Selectivity Interface object.
Definition rcpp_selectivity.hpp:329
VariableVector slope_desc
How quickly selectivity falls on the descending limb; larger values give a steeper decline.
Definition rcpp_selectivity.hpp:315
virtual double evaluate(double x)
evaluate the double logistic selectivity function
Definition rcpp_selectivity.hpp:346
virtual uint32_t get_id()
returns the id for the double logistic selectivity interface
Definition rcpp_selectivity.hpp:340
VariableVector slope_asc
How quickly selectivity rises on the ascending limb; larger values give a steeper,...
Definition rcpp_selectivity.hpp:307
VariableVector inflection_point_asc
The age at which the ascending limb is 0.5 for models that start at age zero and each age bin represe...
Definition rcpp_selectivity.hpp:303
VariableVector inflection_point_desc
The age at which the descending limb is 0.5 for models that start at age zero and each age bin repres...
Definition rcpp_selectivity.hpp:311
virtual std::string to_json()
Convert the data to json representation for the output.
Definition rcpp_selectivity.hpp:436
virtual void finalize()
finalize function. Extracts derived quantities back to the Rcpp interface object from the Information...
Definition rcpp_selectivity.hpp:364
Base class for all interface objects.
Definition rcpp_interface_base.hpp:655
bool finalized
Is the object already finalized? The default is false.
Definition rcpp_interface_base.hpp:660
static std::vector< std::shared_ptr< FIMSRcppInterfaceBase > > fims_interface_objects
FIMS interface object vectors.
Definition rcpp_interface_base.hpp:665
virtual bool add_to_fims_tmb()
A virtual method to inherit to add objects to the TMB model.
Definition rcpp_interface_base.hpp:670
Rcpp interface for logistic selectivity to instantiate the object from R: logistic_selectivity <- met...
Definition rcpp_selectivity.hpp:77
virtual void finalize()
Extracts derived quantities back to the Rcpp interface object from the Information object.
Definition rcpp_selectivity.hpp:137
VariableVector slope
How quickly selectivity changes with age around the inflection point, per year of age....
Definition rcpp_selectivity.hpp:86
LogisticSelectivityInterface()
The constructor.
Definition rcpp_selectivity.hpp:91
virtual std::string to_json()
Converts the data to json representation for the output.
Definition rcpp_selectivity.hpp:188
virtual ~LogisticSelectivityInterface()
The destructor.
Definition rcpp_selectivity.hpp:111
virtual uint32_t get_id()
Gets the ID of the interface base object.
Definition rcpp_selectivity.hpp:117
VariableVector inflection_point
The age at which 50% of fish are selected for models that start at age zero and each age bin represen...
Definition rcpp_selectivity.hpp:82
LogisticSelectivityInterface(const LogisticSelectivityInterface &other)
Construct a new Logistic Selectivity Interface object.
Definition rcpp_selectivity.hpp:103
virtual double evaluate(double x)
Evaluate selectivity using the logistic function.
Definition rcpp_selectivity.hpp:124
An Rcpp interface class that defines the RealVector class.
Definition rcpp_interface_base.hpp:431
size_t size()
Returns the size of a RealVector.
Definition rcpp_interface_base.hpp:602
std::shared_ptr< std::vector< double > > storage_m
real storage.
Definition rcpp_interface_base.hpp:440
Rcpp interface that serves as the parent class for Rcpp selectivity interfaces. This type should be i...
Definition rcpp_selectivity.hpp:19
virtual ~SelectivityInterfaceBase()
The destructor.
Definition rcpp_selectivity.hpp:58
SelectivityInterfaceBase()
The constructor.
Definition rcpp_selectivity.hpp:40
virtual uint32_t get_id()=0
Get the ID for the child selectivity interface objects to inherit.
SelectivityInterfaceBase(const SelectivityInterfaceBase &other)
Construct a new Selectivity Interface Base object.
Definition rcpp_selectivity.hpp:52
static uint32_t id_g
The static id of the SelectivityInterfaceBase.
Definition rcpp_selectivity.hpp:24
virtual double evaluate(double x)=0
A method for each child selectivity interface object to inherit so each selectivity option can have a...
uint32_t id
The local id of the SelectivityInterfaceBase object.
Definition rcpp_selectivity.hpp:28
static std::map< uint32_t, std::shared_ptr< SelectivityInterfaceBase > > live_objects
The map associating the IDs of SelectivityInterfaceBase to the objects. This is a live object,...
Definition rcpp_selectivity.hpp:35
A class that provides shared ownership of an integer value.
Definition rcpp_shared_primitive.hpp:29
int get() const
Retrieve the value of the integer.
Definition rcpp_shared_primitive.hpp:127
An Rcpp interface class that defines the VariableVector class.
Definition rcpp_interface_base.hpp:143
Variable & get(size_t pos)
An internal accessor for calling a position of a VariableVector from R.
Definition rcpp_interface_base.hpp:266
uint32_t id_m
The local ID of the Variable object.
Definition rcpp_interface_base.hpp:156
void resize(size_t size)
Resizes a VariableVector to the desired length.
Definition rcpp_interface_base.hpp:294
size_t size()
Returns the size of a VariableVector.
Definition rcpp_interface_base.hpp:287
#define FIMS_WARNING_LOG(MESSAGE)
Definition def.hpp:648
The Rcpp interface to declare objects that are used ubiquitously throughout the Rcpp interface,...
Includes any .hpp files within the subfolders so that only this file needs to included in include sta...
Age-specific selectivity calculated using one parameter per age bin.
Definition age_specific.hpp:49
size_t min_age
Minimum modeled age, used to map input age to logit_sel_at_age.
Definition age_specific.hpp:65
virtual const Type evaluate(const Type &x)
Calculates selectivity for an age using its age-specific parameter.
Definition age_specific.hpp:89
size_t n_ages
Stores the number of modeled age bins.
Definition age_specific.hpp:60
fims::Vector< Type > logit_sel_at_age
Stores the age-specific selectivity parameters on the logit scale.
Definition age_specific.hpp:55
DoubleLogisticSelectivity class that returns the double logistic function value from fims_math.
Definition double_logistic.hpp:23
fims::Vector< Type > inflection_point_asc
The age at which the ascending limb is 0.5 for models that start at age zero and each age bin represe...
Definition double_logistic.hpp:30
fims::Vector< Type > slope_asc
How quickly selectivity rises on the ascending limb; larger values give a steeper,...
Definition double_logistic.hpp:37
fims::Vector< Type > slope_desc
How quickly selectivity falls on the descending limb; larger values give a steeper decline.
Definition double_logistic.hpp:51
fims::Vector< Type > inflection_point_desc
The age at which the descending limb is 0.5 for models that start at age zero and each age bin repres...
Definition double_logistic.hpp:44
virtual const Type evaluate(const Type &x)
Method of the double logistic selectivity class that implements the double logistic function from FIM...
Definition double_logistic.hpp:68
LogisticSelectivity class that returns the logistic function value from fims_math.
Definition logistic.hpp:29
fims::Vector< Type > slope
How quickly selectivity changes with age around the inflection point, per year of age....
Definition logistic.hpp:42
virtual const Type evaluate(const Type &x)
Method of the logistic selectivity class that implements the logistic function from FIMS math.
Definition logistic.hpp:62
fims::Vector< Type > inflection_point
The age at which 50% of fish are selected for models that start at age zero and each age bin represen...
Definition logistic.hpp:36