FIMS  v0.8.0
Loading...
Searching...
No Matches
rcpp_selectivity.hpp
Go to the documentation of this file.
1
9#ifndef FIMS_INTERFACE_RCPP_RCPP_OBJECTS_RCPP_SELECTIVITY_HPP
10#define FIMS_INTERFACE_RCPP_RCPP_OBJECTS_RCPP_SELECTIVITY_HPP
11
12#include "../../../population_dynamics/selectivity/selectivity.hpp"
14
20 public:
24 static uint32_t id_g;
34 static std::map<uint32_t, std::shared_ptr<SelectivityInterfaceBase>>
36
42 /* Create instance of map: key is id and value is pointer to
43 SelectivityInterfaceBase */
44 // SelectivityInterfaceBase::live_objects[this->id] = this;
45 }
46
54
59
63 virtual uint32_t get_id() = 0;
64
69 virtual double evaluate(double x) = 0;
70};
71// static id of the SelectivityInterfaceBase object
73// local id of the SelectivityInterfaceBase object map relating the ID of the
74// SelectivityInterfaceBase to the SelectivityInterfaceBase objects
75std::map<uint32_t, std::shared_ptr<SelectivityInterfaceBase>>
77
84 public:
93
99 std::make_shared<LogisticSelectivityInterface>(*this);
102 }
103
113
118
123 virtual uint32_t get_id() { return this->id; }
124
130 virtual double evaluate(double x) {
133 LogisticSel.inflection_point[0] = this->inflection_point[0].initial_value_m;
134 LogisticSel.slope.resize(1);
135 LogisticSel.slope[0] = this->slope[0].initial_value_m;
136 return LogisticSel.evaluate(x);
137 }
138
143 virtual void finalize() {
144 if (this->finalized) {
145 // log warning that finalize has been called more than once.
146 FIMS_WARNING_LOG("Logistic Selectivity " + fims::to_string(this->id) +
147 " has been finalized already.");
148 }
149
150 this->finalized = true; // indicate this has been called already
151
152 std::shared_ptr<fims_info::Information<double>> info =
154
156
157 // search for maturity in Information
158 it = info->selectivity_models.find(this->id);
159 // if not found, just return
160 if (it == info->selectivity_models.end()) {
161 FIMS_WARNING_LOG("Logistic Selectivity " + fims::to_string(this->id) +
162 " not found in Information.");
163 return;
164 } else {
165 std::shared_ptr<fims_popdy::LogisticSelectivity<double>> sel =
166 std::dynamic_pointer_cast<fims_popdy::LogisticSelectivity<double>>(
167 it->second);
168
169 for (size_t i = 0; i < inflection_point.size(); i++) {
170 if (this->inflection_point[i].estimation_type_m.get() == "constant") {
171 this->inflection_point[i].final_value_m =
172 this->inflection_point[i].initial_value_m;
173 } else {
174 this->inflection_point[i].final_value_m = sel->inflection_point[i];
175 }
176 }
177
178 for (size_t i = 0; i < slope.size(); i++) {
179 if (this->slope[i].estimation_type_m.get() == "constant") {
180 this->slope[i].final_value_m = this->slope[i].initial_value_m;
181 } else {
182 this->slope[i].final_value_m = sel->slope[i];
183 }
184 }
185 }
186 }
195 virtual void set_uncertainty(
196 std::map<std::string, std::vector<double>> &se_values) {
198 this->inflection_point.size(), -999);
199 this->get_se_values("inflection_point", se_values,
201 fims::Vector<double> slope_uncertainty(this->slope.size(), -999);
202 this->get_se_values("slope", se_values, slope_uncertainty);
203 for (size_t i = 0; i < this->inflection_point.size(); i++) {
204 this->inflection_point[i].uncertainty_m = inflection_point_uncertainty[i];
205 }
206 for (size_t i = 0; i < this->slope.size(); i++) {
207 this->slope[i].uncertainty_m = slope_uncertainty[i];
208 }
209 }
210
217 virtual std::string to_json() {
218 std::stringstream ss;
219
220 ss << "{\n";
221 ss << " \"module_name\":\"Selectivity\",\n";
222 ss << " \"module_type\": \"Logistic\",\n";
223 ss << " \"module_id\": " << this->id << ",\n";
224
225 ss << " \"parameters\": [\n{\n";
226 ss << " \"name\": \"inflection_point\",\n";
227 ss << " \"id\":" << this->inflection_point.id_m << ",\n";
228 ss << " \"type\": \"vector\",\n";
229 ss << " \"dimensionality\": {\n";
230 ss << " \"header\": [null],\n";
231 ss << " \"dimensions\": [1]\n},\n";
232 ss << " \"values\":" << this->inflection_point << "},\n ";
233
234 ss << "{\n";
235 ss << " \"name\": \"slope\",\n";
236 ss << " \"id\":" << this->slope.id_m << ",\n";
237 ss << " \"type\": \"vector\",\n";
238 ss << " \"dimensionality\": {\n";
239 ss << " \"header\": [null],\n";
240 ss << " \"dimensions\": [1]\n},\n";
241 ss << " \"values\":" << this->slope << "}]\n";
242
243 ss << "}";
244
245 return ss.str();
246 }
247
248#ifdef TMB_MODEL
249
250 template <typename Type>
252 std::shared_ptr<fims_info::Information<Type>> info =
254
255 std::shared_ptr<fims_popdy::LogisticSelectivity<Type>> selectivity =
256 std::make_shared<fims_popdy::LogisticSelectivity<Type>>();
257 std::stringstream ss;
258 // set relative info
259 selectivity->id = this->id;
260 selectivity->inflection_point.resize(this->inflection_point.size());
261 for (size_t i = 0; i < this->inflection_point.size(); i++) {
262 selectivity->inflection_point[i] =
263 this->inflection_point[i].initial_value_m;
264 if (this->inflection_point[i].estimation_type_m.get() ==
265 "fixed_effects") {
266 ss.str("");
267 ss << "Selectivity." << this->id << ".inflection_point."
268 << this->inflection_point[i].id_m;
269 info->RegisterParameterName(ss.str());
270 info->RegisterParameter(selectivity->inflection_point[i]);
271 }
272 if (this->inflection_point[i].estimation_type_m.get() ==
273 "random_effects") {
274 ss.str("");
275 ss << "Selectivity." << this->id << ".inflection_point."
276 << this->inflection_point[i].id_m;
277 info->RegisterRandomEffect(selectivity->inflection_point[i]);
278 info->RegisterRandomEffectName(ss.str());
279 }
280 }
281 info->variable_map[this->inflection_point.id_m] =
282 &(selectivity)->inflection_point;
283
284 selectivity->slope.resize(this->slope.size());
285 for (size_t i = 0; i < this->slope.size(); i++) {
286 selectivity->slope[i] = this->slope[i].initial_value_m;
287 if (this->slope[i].estimation_type_m.get() == "fixed_effects") {
288 ss.str("");
289 ss << "Selectivity." << this->id << ".slope." << this->slope[i].id_m;
290 info->RegisterParameterName(ss.str());
291 info->RegisterParameter(selectivity->slope[i]);
292 }
293 if (this->slope[i].estimation_type_m.get() == "random_effects") {
294 ss.str("");
295 ss << "Selectivity." << this->id << ".slope." << this->slope[i].id_m;
296 info->RegisterRandomEffectName(ss.str());
297 info->RegisterRandomEffect(selectivity->slope[i]);
298 }
299 }
300 info->variable_map[this->slope.id_m] = &(selectivity)->slope;
301
302 // add to Information
303 info->selectivity_models[selectivity->id] = selectivity;
304
305 return true;
306 }
307
312 virtual bool add_to_fims_tmb() {
313#ifdef TMBAD_FRAMEWORK
316#else
321#endif
322
323 return true;
324 }
325
326#endif
327};
328
335 public:
347 std::make_shared<DoubleLogisticSelectivityInterface>(*this);
350 }
351
364
366
368 virtual uint32_t get_id() { return this->id; }
369
374 virtual double evaluate(double x) {
377 DoubleLogisticSel.inflection_point_asc[0] =
378 this->inflection_point_asc[0].initial_value_m;
379 DoubleLogisticSel.slope_asc.resize(1);
380 DoubleLogisticSel.slope_asc[0] = this->slope_asc[0].initial_value_m;
381 DoubleLogisticSel.inflection_point_desc.resize(1);
382 DoubleLogisticSel.inflection_point_desc[0] =
383 this->inflection_point_desc[0].initial_value_m;
384 DoubleLogisticSel.slope_desc.resize(1);
385 DoubleLogisticSel.slope_desc[0] = this->slope_desc[0].initial_value_m;
386 return DoubleLogisticSel.evaluate(x);
387 }
392 virtual void finalize() {
393 if (this->finalized) {
394 // log warning that finalize has been called more than once.
395 FIMS_WARNING_LOG("Double Logistic Selectivity " +
396 fims::to_string(this->id) +
397 " has been finalized already.");
398 }
399
400 this->finalized = true; // indicate this has been called already
401
402 std::shared_ptr<fims_info::Information<double>> info =
404
406
407 // search for maturity in Information
408 it = info->selectivity_models.find(this->id);
409 // if not found, just return
410 if (it == info->selectivity_models.end()) {
411 FIMS_WARNING_LOG("Double Logistic Selectivity " +
412 fims::to_string(this->id) +
413 " not found in Information.");
414 return;
415 } else {
416 std::shared_ptr<fims_popdy::DoubleLogisticSelectivity<double>> sel =
417 std::dynamic_pointer_cast<
419
420 for (size_t i = 0; i < inflection_point_asc.size(); i++) {
421 if (this->inflection_point_asc[i].estimation_type_m.get() ==
422 "constant") {
423 this->inflection_point_asc[i].final_value_m =
424 this->inflection_point_asc[i].initial_value_m;
425 } else {
426 this->inflection_point_asc[i].final_value_m =
427 sel->inflection_point_asc[i];
428 }
429 }
430
431 for (size_t i = 0; i < slope_asc.size(); i++) {
432 if (this->slope_asc[i].estimation_type_m.get() == "constant") {
433 this->slope_asc[i].final_value_m = this->slope_asc[i].initial_value_m;
434 } else {
435 this->slope_asc[i].final_value_m = sel->slope_asc[i];
436 }
437 }
438
439 for (size_t i = 0; i < inflection_point_desc.size(); i++) {
440 if (this->inflection_point_desc[i].estimation_type_m.get() ==
441 "constant") {
442 this->inflection_point_desc[i].final_value_m =
443 this->inflection_point_desc[i].initial_value_m;
444 } else {
445 this->inflection_point_desc[i].final_value_m =
446 sel->inflection_point_desc[i];
447 }
448 }
449
450 for (size_t i = 0; i < slope_desc.size(); i++) {
451 if (this->slope_desc[i].estimation_type_m.get() == "constant") {
452 this->slope_desc[i].final_value_m =
453 this->slope_desc[i].initial_value_m;
454 } else {
455 this->slope_desc[i].final_value_m = sel->slope_desc[i];
456 }
457 }
458 }
459 }
460
469 virtual void set_uncertainty(
470 std::map<std::string, std::vector<double>> &se_values) {
472 this->inflection_point_asc.size(), -999);
473 this->get_se_values("inflection_point_asc", se_values,
476 this->get_se_values("slope_asc", se_values, slope_asc_uncertainty);
478 this->inflection_point_desc.size(), -999);
479 this->get_se_values("inflection_point_desc", se_values,
482 this->get_se_values("slope_desc", se_values, slope_desc_uncertainty);
483 for (size_t i = 0; i < this->inflection_point_asc.size(); i++) {
484 this->inflection_point_asc[i].uncertainty_m =
486 }
487 for (size_t i = 0; i < this->slope_asc.size(); i++) {
488 this->slope_asc[i].uncertainty_m = slope_asc_uncertainty[i];
489 }
490 for (size_t i = 0; i < this->inflection_point_desc.size(); i++) {
491 this->inflection_point_desc[i].uncertainty_m =
493 }
494 for (size_t i = 0; i < this->slope_desc.size(); i++) {
495 this->slope_desc[i].uncertainty_m = slope_desc_uncertainty[i];
496 }
497 }
498
502 virtual std::string to_json() {
503 std::stringstream ss;
504
505 ss << "{\n";
506 ss << " \"module_name\": \"Selectivity\",\n";
507 ss << " \"module_type\": \"DoubleLogistic\",\n";
508 ss << " \"module_id\": " << this->id << ",\n";
509
510 ss << " \"parameters\":[\n{\n";
511 ss << " \"name\": \"inflection_point_asc\",\n";
512 ss << " \"id\":" << this->inflection_point_asc.id_m << ",\n";
513 ss << " \"type\": \"vector\",\n";
514 ss << " \"dimensionality\": {\n";
515 ss << " \"header\": [null],\n";
516 ss << " \"dimensions\": [1]\n},\n";
517 ss << " \"values\":" << this->inflection_point_asc << "},\n";
518
519 ss << "{\n";
520 ss << " \"name\": \"slope_asc\",\n";
521 ss << " \"id\":" << this->slope_asc.id_m << ",\n";
522 ss << " \"type\": \"vector\",\n";
523 ss << " \"dimensionality\": {\n";
524 ss << " \"header\": [null],\n";
525 ss << " \"dimensions\": [1]\n},\n";
526 ss << " \"values\":" << this->slope_asc << "},\n";
527
528 ss << " {\n";
529 ss << " \"name\": \"inflection_point_desc\",\n";
530 ss << " \"id\":" << this->inflection_point_desc.id_m << ",\n";
531 ss << " \"type\": \"vector\",\n";
532 ss << " \"dimensionality\": {\n";
533 ss << " \"header\": [null],\n";
534 ss << " \"dimensions\": [1]\n},\n";
535 ss << " \"values\":" << this->inflection_point_desc << "},\n";
536
537 ss << "{\n";
538 ss << " \"name\": \"slope_desc\",\n";
539 ss << " \"id\":" << this->slope_desc.id_m << ",\n";
540 ss << " \"type\": \"vector\",\n";
541 ss << " \"dimensionality\": {\n";
542 ss << " \"header\": [null],\n";
543 ss << " \"dimensions\": [1]\n},\n";
544 ss << " \"values\":" << this->slope_desc << "}]\n";
545
546 ss << "}";
547
548 return ss.str();
549 }
550
551#ifdef TMB_MODEL
552
553 template <typename Type>
555 std::shared_ptr<fims_info::Information<Type>> info =
557
558 std::shared_ptr<fims_popdy::DoubleLogisticSelectivity<Type>> selectivity =
559 std::make_shared<fims_popdy::DoubleLogisticSelectivity<Type>>();
560
561 std::stringstream ss;
562 // set relative info
563 selectivity->id = this->id;
564 selectivity->inflection_point_asc.resize(this->inflection_point_asc.size());
565 for (size_t i = 0; i < this->inflection_point_asc.size(); i++) {
566 selectivity->inflection_point_asc[i] =
567 this->inflection_point_asc[i].initial_value_m;
568 if (this->inflection_point_asc[i].estimation_type_m.get() ==
569 "fixed_effects") {
570 ss.str("");
571 ss << "Selectivity." << this->id << ".inflection_point_asc."
572 << this->inflection_point_asc[i].id_m;
573 info->RegisterParameterName(ss.str());
574 info->RegisterParameter(selectivity->inflection_point_asc[i]);
575 }
576 if (this->inflection_point_asc[i].estimation_type_m.get() ==
577 "random_effects") {
578 ss.str("");
579 ss << "Selectivity." << this->id << ".inflection_point_asc."
580 << this->inflection_point_asc[i].id_m;
581 info->RegisterRandomEffectName(ss.str());
582 info->RegisterRandomEffect(selectivity->inflection_point_asc[i]);
583 }
584 }
585 info->variable_map[this->inflection_point_asc.id_m] =
586 &(selectivity)->inflection_point_asc;
587
588 selectivity->slope_asc.resize(this->slope_asc.size());
589 for (size_t i = 0; i < this->slope_asc.size(); i++) {
590 selectivity->slope_asc[i] = this->slope_asc[i].initial_value_m;
591
592 if (this->slope_asc[i].estimation_type_m.get() == "fixed_effects") {
593 ss.str("");
594 ss << "Selectivity." << this->id << ".slope_asc."
595 << this->slope_asc[i].id_m;
596 info->RegisterParameterName(ss.str());
597 info->RegisterParameter(selectivity->slope_asc[i]);
598 }
599 if (this->slope_asc[i].estimation_type_m.get() == "random_effects") {
600 ss.str("");
601 ss << "Selectivity." << this->id << ".slope_asc."
602 << this->slope_asc[i].id_m;
603 info->RegisterRandomEffectName(ss.str());
604 info->RegisterRandomEffect(selectivity->slope_asc[i]);
605 }
606 }
607 info->variable_map[this->slope_asc.id_m] = &(selectivity)->slope_asc;
608
609 selectivity->inflection_point_desc.resize(
610 this->inflection_point_desc.size());
611 for (size_t i = 0; i < this->inflection_point_desc.size(); i++) {
612 selectivity->inflection_point_desc[i] =
613 this->inflection_point_desc[i].initial_value_m;
614
615 if (this->inflection_point_desc[i].estimation_type_m.get() ==
616 "fixed_effects") {
617 ss.str("");
618 ss << "Selectivity." << this->id << ".inflection_point_desc."
619 << this->inflection_point_desc[i].id_m;
620 info->RegisterParameterName(ss.str());
621 info->RegisterParameter(selectivity->inflection_point_desc[i]);
622 }
623 if (this->inflection_point_desc[i].estimation_type_m.get() ==
624 "random_effects") {
625 ss.str("");
626 ss << "Selectivity." << this->id << ".inflection_point_desc."
627 << this->inflection_point_desc[i].id_m;
628 info->RegisterRandomEffectName(ss.str());
629 info->RegisterRandomEffect(selectivity->inflection_point_desc[i]);
630 }
631 }
632 info->variable_map[this->inflection_point_desc.id_m] =
633 &(selectivity)->inflection_point_desc;
634
635 selectivity->slope_desc.resize(this->slope_desc.size());
636 for (size_t i = 0; i < this->slope_desc.size(); i++) {
637 selectivity->slope_desc[i] = this->slope_desc[i].initial_value_m;
638
639 if (this->slope_desc[i].estimation_type_m.get() == "fixed_effects") {
640 ss.str("");
641 ss << "Selectivity." << this->id << ".slope_desc."
642 << this->slope_desc[i].id_m;
643 info->RegisterParameterName(ss.str());
644 info->RegisterParameter(selectivity->slope_desc[i]);
645 }
646 if (this->slope_desc[i].estimation_type_m.get() == "random_effects") {
647 ss.str("");
648 ss << "Selectivity." << this->id << ".slope_desc."
649 << this->slope_desc[i].id_m;
650 info->RegisterRandomEffectName(ss.str());
651 info->RegisterRandomEffect(selectivity->slope_desc[i]);
652 }
653 }
654
655 info->variable_map[this->slope_desc.id_m] = &(selectivity)->slope_desc;
656
657 // add to Information
658 info->selectivity_models[selectivity->id] = selectivity;
659
660 return true;
661 }
662
667 virtual bool add_to_fims_tmb() {
668#ifdef TMBAD_FRAMEWORK
671#else
676#endif
677
678 return true;
679 }
680
681#endif
682};
683
684#endif
Rcpp interface for logistic selectivity as an S4 object. To instantiate from R: logistic_selectivity ...
Definition rcpp_selectivity.hpp:334
ParameterVector slope_desc
Definition rcpp_selectivity.hpp:343
ParameterVector inflection_point_desc
Definition rcpp_selectivity.hpp:340
DoubleLogisticSelectivityInterface(const DoubleLogisticSelectivityInterface &other)
Construct a new Double Logistic Selectivity Interface object.
Definition rcpp_selectivity.hpp:357
ParameterVector slope_asc
Definition rcpp_selectivity.hpp:339
virtual double evaluate(double x)
evaluate the double logistic selectivity function
Definition rcpp_selectivity.hpp:374
ParameterVector inflection_point_asc
Definition rcpp_selectivity.hpp:336
virtual uint32_t get_id()
returns the id for the double logistic selectivity interface
Definition rcpp_selectivity.hpp:368
virtual void set_uncertainty(std::map< std::string, std::vector< double > > &se_values)
Set uncertainty values for double logistic selectivity parameters.
Definition rcpp_selectivity.hpp:469
virtual std::string to_json()
Convert the data to json representation for the output.
Definition rcpp_selectivity.hpp:502
virtual void finalize()
finalize function. Extracts derived quantities back to the Rcpp interface object from the Information...
Definition rcpp_selectivity.hpp:392
Base class for all interface objects.
Definition rcpp_interface_base.hpp:634
bool finalized
Is the object already finalized? The default is false.
Definition rcpp_interface_base.hpp:639
static std::vector< std::shared_ptr< FIMSRcppInterfaceBase > > fims_interface_objects
FIMS interface object vectors.
Definition rcpp_interface_base.hpp:644
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.
Definition rcpp_interface_base.hpp:672
virtual bool add_to_fims_tmb()
A virtual method to inherit to add objects to the TMB model.
Definition rcpp_interface_base.hpp:649
Rcpp interface for logistic selectivity to instantiate the object from R: logistic_selectivity <- met...
Definition rcpp_selectivity.hpp:83
virtual void finalize()
Extracts derived quantities back to the Rcpp interface object from the Information object.
Definition rcpp_selectivity.hpp:143
ParameterVector inflection_point
The index value at which the response reaches 0.5.
Definition rcpp_selectivity.hpp:88
LogisticSelectivityInterface()
The constructor.
Definition rcpp_selectivity.hpp:97
virtual std::string to_json()
Converts the data to json representation for the output.
Definition rcpp_selectivity.hpp:217
virtual ~LogisticSelectivityInterface()
The destructor.
Definition rcpp_selectivity.hpp:117
virtual uint32_t get_id()
Gets the ID of the interface base object.
Definition rcpp_selectivity.hpp:123
ParameterVector slope
The width of the curve at the inflection point.
Definition rcpp_selectivity.hpp:92
LogisticSelectivityInterface(const LogisticSelectivityInterface &other)
Construct a new Logistic Selectivity Interface object.
Definition rcpp_selectivity.hpp:109
virtual void set_uncertainty(std::map< std::string, std::vector< double > > &se_values)
Set uncertainty values for selectivity parameters.
Definition rcpp_selectivity.hpp:195
virtual double evaluate(double x)
Evaluate selectivity using the logistic function.
Definition rcpp_selectivity.hpp:130
An Rcpp interface class that defines the ParameterVector class.
Definition rcpp_interface_base.hpp:178
void resize(size_t size)
Resizes a ParameterVector to the desired length.
Definition rcpp_interface_base.hpp:323
size_t size()
Returns the size of a ParameterVector.
Definition rcpp_interface_base.hpp:316
uint32_t id_m
The local ID of the Parameter object.
Definition rcpp_interface_base.hpp:191
Parameter & get(size_t pos)
An internal accessor for calling a position of a ParameterVector from R.
Definition rcpp_interface_base.hpp:295
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
Definition fims_vector.hpp:27
std::map< uint32_t, std::shared_ptr< fims_popdy::SelectivityBase< Type > > > selectivity_models
Definition information.hpp:80
std::map< uint32_t, std::shared_ptr< fims_popdy::SelectivityBase< Type > > >::iterator selectivity_models_iterator
Definition information.hpp:84
static std::shared_ptr< Information< Type > > GetInstance()
Returns a singleton Information object for type T.
Definition information.hpp:238
#define FIMS_WARNING_LOG(MESSAGE)
Definition def.hpp:598
void clear_internal()
Clears the internal objects.
Definition rcpp_interface.hpp:279
The Rcpp interface to declare objects that are used ubiquitously throughout the Rcpp interface,...
DoubleLogisticSelectivity class that returns the double logistic function value from fims_math.
Definition double_logistic.hpp:24
fims::Vector< Type > inflection_point_asc
Definition double_logistic.hpp:25
fims::Vector< Type > inflection_point_desc
Definition double_logistic.hpp:31
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:53
LogisticSelectivity class that returns the logistic function value from fims_math.
Definition logistic.hpp:30
fims::Vector< Type > inflection_point
Definition logistic.hpp:32