9#ifndef FIMS_INTERFACE_RCPP_RCPP_OBJECTS_RCPP_DISTRIBUTION_HPP
10#define FIMS_INTERFACE_RCPP_RCPP_OBJECTS_RCPP_DISTRIBUTION_HPP
13#include "../../../distributions/distributions.hpp"
32 std::shared_ptr<std::vector<uint32_t>>
key_m;
66 static std::map<uint32_t, std::shared_ptr<DistributionsInterfaceBase>>
81 this->key_m = std::make_shared<std::vector<uint32_t>>();
119 Rcpp::IntegerVector
ids) {
166std::map<uint32_t, std::shared_ptr<DistributionsInterfaceBase>>
205 std::make_shared<DnormDistributionsInterface>(*
this);
247 this->expected_mean[0].initial_value_m =
input_value;
248 this->expected_mean[0].estimation_type_m.
set(
"fixed_effects");
257 Rcpp::IntegerVector
ids) {
259 this->
key_m->resize(ids.size());
275 dnorm.expected_values.resize(this->expected_values.
size());
276 dnorm.log_sd.resize(this->log_sd.
size());
277 dnorm.expected_mean.resize(this->expected_mean.
size());
278 for (
size_t i = 0;
i < this->observed_values.
size();
i++) {
279 dnorm.observed_values[
i] = this->observed_values[
i].initial_value_m;
281 for (
size_t i = 0;
i < this->expected_values.
size();
i++) {
282 dnorm.expected_values[
i] = this->expected_values[
i].initial_value_m;
284 for (
size_t i = 0;
i < this->log_sd.
size();
i++) {
285 dnorm.log_sd[
i] = this->log_sd[
i].initial_value_m;
287 for (
size_t i = 0;
i < this->expected_mean.
size();
i++) {
288 dnorm.expected_mean[
i] = this->expected_mean[
i].initial_value_m;
302 " has been finalized already.");
307 std::shared_ptr<fims_info::Information<double>>
info =
313 it =
info->density_components.find(this->
id_m);
317 " not found in Information.");
320 std::shared_ptr<fims_distributions::NormalLPDF<double>>
dnorm =
321 std::dynamic_pointer_cast<fims_distributions::NormalLPDF<double>>(
330 if (this->log_sd.
size() !=
n_x) {
332 if (this->log_sd.
size() == 1) {
333 auto tmp = this->log_sd[0];
335 for (
size_t i = 0;
i <
n_x; ++
i) {
336 this->log_sd[
i] =
tmp;
341 "log_sd size does not match number of observations and is not "
345 for (
size_t i = 0;
i <
n_x;
i++) {
346 if (this->log_sd[
i].estimation_type_m.
get() ==
"constant") {
347 this->log_sd[
i].final_value_m = this->log_sd[
i].initial_value_m;
349 this->log_sd[
i].final_value_m =
dnorm->log_sd.get_force_scalar(
i);
353 for (
size_t i = 0;
i < this->expected_mean.
size();
i++) {
354 if (this->expected_mean[
i].estimation_type_m.
get() ==
"constant") {
355 this->expected_mean[
i].final_value_m =
356 this->expected_mean[
i].initial_value_m;
358 this->expected_mean[
i].final_value_m =
dnorm->expected_mean[
i];
363 if (this->expected_values.
size() == 1) {
366 if (this->observed_values.
size() == 1) {
370 for (
size_t i = 0;
i < this->lpdf_vec.
size();
i++) {
371 this->lpdf_vec[
i] =
dnorm->lpdf_vec[
i];
372 this->expected_values[
i].final_value_m =
dnorm->get_expected(
i);
373 this->observed_values[
i].final_value_m =
dnorm->get_observed(
i);
386 std::stringstream
ss;
389 ss <<
" \"module_name\": \"density\",\n";
390 ss <<
" \"module_id\": " << this->
id_m <<
",\n";
391 ss <<
" \"module_type\": \"normal\",\n";
394 ss <<
" \"input_type\" : \"" << this->
input_type_m <<
"\",\n";
395 ss <<
" \"density_component\": {\n";
397 ss <<
" \"value\":[";
398 if (this->lpdf_vec.
size() == 0) {
401 for (
size_t i = 0;
i < this->lpdf_vec.
size() - 1;
i++) {
409 ss <<
" \"expected_values\":[";
410 if (this->expected_values.
size() == 0) {
413 for (
size_t i = 0;
i < this->expected_values.
size() - 1;
i++) {
418 this->expected_values[this->expected_values.
size() - 1]
422 ss <<
" \"log_sd_values\":[";
423 if (this->log_sd.
size() == 0) {
431 this->log_sd[this->log_sd.
size() - 1].final_value_m)
434 ss <<
" \"observed_values\":[";
435 if (this->observed_values.
size() == 0) {
438 for (
size_t i = 0;
i < this->observed_values.
size() - 1;
i++) {
439 ss << this->observed_values[
i].final_value_m <<
", ";
441 ss << this->observed_values[this->observed_values.
size() - 1]
451 template <
typename Type>
453 std::shared_ptr<fims_info::Information<Type>>
info =
456 std::shared_ptr<fims_distributions::NormalLPDF<Type>>
distribution =
457 std::make_shared<fims_distributions::NormalLPDF<Type>>();
462 std::stringstream
ss;
464 distribution->key.resize(this->
key_m->size());
465 for (
size_t i = 0;
i < this->
key_m->size();
i++) {
466 distribution->key[
i] = this->
key_m->at(
i);
468 distribution->id = this->
id_m;
469 distribution->observed_values.resize(this->observed_values.
size());
470 for (
size_t i = 0;
i < this->observed_values.
size();
i++) {
472 this->observed_values[
i].initial_value_m;
476 for (
size_t i = 0;
i < this->expected_values.
size();
i++) {
478 this->expected_values[
i].initial_value_m;
481 for (
size_t i = 0;
i < this->log_sd.
size();
i++) {
483 if (this->log_sd[
i].estimation_type_m.
get() ==
"fixed_effects") {
485 ss <<
"dnorm." << this->
id_m <<
".log_sd." << this->log_sd[
i].
id_m;
486 info->RegisterParameterName(
ss.str());
489 if (this->log_sd[
i].estimation_type_m.
get() ==
"random_effects") {
490 FIMS_ERROR_LOG(
"standard deviations cannot be set to random effects");
496 distribution->expected_mean.resize(this->expected_mean.
size());
497 for (
size_t i = 0;
i < this->expected_mean.
size();
i++) {
498 distribution->expected_mean[
i] = this->expected_mean[
i].initial_value_m;
499 if (this->expected_mean[
i].estimation_type_m.
get() ==
"fixed_effects") {
501 ss <<
"dnorm." << this->
id_m <<
".expected_mean."
502 << this->expected_mean[
i].
id_m;
503 info->RegisterParameterName(
ss.str());
506 if (this->expected_mean[
i].estimation_type_m.
get() ==
"random_effects") {
510 info->variable_map[this->expected_mean.
id_m] =
566 std::make_shared<DlnormDistributionsInterface>(*
this);
612 Rcpp::IntegerVector
ids) {
614 this->
key_m->resize(ids.size());
630 dlnorm.expected_values.resize(this->expected_values.
size());
633 for (
size_t i = 0;
i < this->observed_values.
size();
i++) {
634 dlnorm.observed_values[
i] = this->observed_values[
i].initial_value_m;
636 for (
size_t i = 0;
i < this->expected_values.
size();
i++) {
637 dlnorm.expected_values[
i] = this->expected_values[
i].initial_value_m;
639 for (
size_t i = 0;
i < this->log_sd.
size();
i++) {
640 dlnorm.log_sd[
i] = this->log_sd[
i].initial_value_m;
653 " has been finalized already.");
658 std::shared_ptr<fims_info::Information<double>>
info =
664 it =
info->density_components.find(this->
id_m);
668 " not found in Information.");
671 std::shared_ptr<fims_distributions::LogNormalLPDF<double>>
dlnorm =
672 std::dynamic_pointer_cast<fims_distributions::LogNormalLPDF<double>>(
679 if (this->log_sd.
size() !=
n_x) {
681 if (this->log_sd.
size() == 1) {
682 auto tmp = this->log_sd[0];
684 for (
size_t i = 0;
i <
n_x; ++
i) {
685 this->log_sd[
i] =
tmp;
690 "log_sd size does not match number of observations and is not "
695 for (
size_t i = 0;
i <
n_x;
i++) {
696 if (this->log_sd[
i].estimation_type_m.
get() ==
"constant") {
697 this->log_sd[
i].final_value_m = this->log_sd[
i].initial_value_m;
699 this->log_sd[
i].final_value_m =
dlnorm->log_sd.get_force_scalar(
i);
704 if (this->expected_values.
size() == 1) {
707 if (this->observed_values.
size() == 1) {
710 for (
size_t i = 0;
i < this->lpdf_vec.
size();
i++) {
711 this->lpdf_vec[
i] =
dlnorm->lpdf_vec[
i];
712 this->expected_values[
i].final_value_m =
dlnorm->get_expected(
i);
713 this->observed_values[
i].final_value_m =
dlnorm->get_observed(
i);
726 std::stringstream
ss;
729 ss <<
" \"module_name\": \"density\",\n";
730 ss <<
" \"module_id\": " << this->
id_m <<
",\n";
731 ss <<
" \"module_type\": \"log_normal\",\n";
734 ss <<
" \"input_type\" : \"" << this->
input_type_m <<
"\",\n";
735 ss <<
" \"density_component\": {\n";
737 ss <<
" \"value\":[";
738 if (this->lpdf_vec.
size() == 0) {
741 for (
size_t i = 0;
i < this->lpdf_vec.
size() - 1;
i++) {
748 ss <<
" \"expected_values\":[";
749 if (this->expected_values.
size() == 0) {
752 for (
size_t i = 0;
i < this->expected_values.
size() - 1;
i++) {
757 this->expected_values[this->expected_values.
size() - 1]
762 ss <<
" \"log_sd_values\":[";
763 if (this->log_sd.
size() == 0) {
771 this->log_sd[this->log_sd.
size() - 1].final_value_m)
774 ss <<
" \"observed_values\":[";
775 if (this->observed_values.
size() == 0) {
778 for (
size_t i = 0;
i < this->observed_values.
size() - 1;
i++) {
779 ss << this->observed_values[
i].final_value_m <<
", ";
781 ss << this->observed_values[this->observed_values.
size() - 1]
791 template <
typename Type>
793 std::shared_ptr<fims_info::Information<Type>>
info =
796 std::shared_ptr<fims_distributions::LogNormalLPDF<Type>>
distribution =
797 std::make_shared<fims_distributions::LogNormalLPDF<Type>>();
801 std::stringstream
ss;
804 distribution->key.resize(this->
key_m->size());
805 for (
size_t i = 0;
i < this->
key_m->size();
i++) {
806 distribution->key[
i] = this->
key_m->at(
i);
808 distribution->observed_values.resize(this->observed_values.
size());
809 for (
size_t i = 0;
i < this->observed_values.
size();
i++) {
811 this->observed_values[
i].initial_value_m;
815 for (
size_t i = 0;
i < this->expected_values.
size();
i++) {
817 this->expected_values[
i].initial_value_m;
820 for (
size_t i = 0;
i < this->log_sd.
size();
i++) {
822 if (this->log_sd[
i].estimation_type_m.
get() ==
"fixed_effects") {
824 ss <<
"dlnorm." << this->
id_m <<
".log_sd." << this->log_sd[
i].
id_m;
825 info->RegisterParameterName(
ss.str());
828 if (this->log_sd[
i].estimation_type_m.
get() ==
"random_effects") {
829 FIMS_ERROR_LOG(
"standard deviations cannot be set to random effects");
891 std::make_shared<DmultinomDistributionsInterface>(*
this);
937 Rcpp::IntegerVector
ids) {
939 this->
key_m->resize(ids.size());
962 dmultinom.expected_values.resize(this->expected_values.
size());
964 dmultinom.observed_values[
i] = this->observed_values[
i].initial_value_m;
967 dmultinom.expected_values[
i] = this->expected_values[
i].initial_value_m;
979 fims::to_string(this->
id_m) +
980 " has been finalized already.");
985 std::shared_ptr<fims_info::Information<double>>
info =
991 it =
info->density_components.find(this->
id_m);
995 " not found in Information.");
998 std::shared_ptr<fims_distributions::MultinomialLPMF<double>>
dmultinom =
999 std::dynamic_pointer_cast<
1005 this->lpdf_vec = Rcpp::NumericVector(
n_x);
1006 if (this->expected_values.
size() !=
n_x) {
1009 if (this->observed_values.
size() !=
n_x) {
1012 for (
size_t i = 0;
i < this->lpdf_vec.
size();
i++) {
1014 this->expected_values[
i].final_value_m =
dmultinom->get_expected(
i);
1016 this->observed_values[
i].final_value_m =
dmultinom->get_observed(
i);
1023 for (
size_t i = 0;
i <
dims[0];
i++) {
1024 for (
size_t j = 0;
j <
dims[1];
j++) {
1026 this->observed_values[
idx].final_value_m =
dmultinom->get_observed(
1027 static_cast<size_t>(
i),
static_cast<size_t>(
j));
1042 std::stringstream
ss;
1045 ss <<
" \"module_name\": \"density\",\n";
1046 ss <<
" \"module_id\": " << this->
id_m <<
",\n";
1047 ss <<
" \"module_type\": \"multinomial\",\n";
1050 ss <<
" \"input_type\" : \"" << this->
input_type_m <<
"\",\n";
1051 ss <<
" \"density_component\": {\n";
1052 ss <<
" \"lpdf_value\": " << this->
lpdf_value <<
",\n";
1053 ss <<
" \"value\":[";
1054 if (this->lpdf_vec.
size() == 0) {
1057 for (
size_t i = 0;
i < this->lpdf_vec.
size() - 1;
i++) {
1065 ss <<
" \"expected_values\":[";
1066 if (this->expected_values.
size() == 0) {
1069 for (
size_t i = 0;
i < this->expected_values.
size() - 1;
i++) {
1074 this->expected_values[this->expected_values.
size() - 1]
1080 ss <<
" \"observed_values\":[";
1081 if (this->observed_values.
size() == 0) {
1084 for (
size_t i = 0;
i < this->observed_values.
size() - 1;
i++) {
1085 ss << this->observed_values[
i].final_value_m <<
", ";
1087 ss << this->observed_values[this->observed_values.
size() - 1]
1097 template <
typename Type>
1099 std::shared_ptr<fims_info::Information<Type>>
info =
1102 std::shared_ptr<fims_distributions::MultinomialLPMF<Type>>
distribution =
1103 std::make_shared<fims_distributions::MultinomialLPMF<Type>>();
1108 distribution->key.resize(this->
key_m->size());
1109 for (
size_t i = 0;
i < this->
key_m->size();
i++) {
1110 distribution->key[
i] = this->
key_m->at(
i);
1112 distribution->observed_values.resize(this->observed_values.
size());
1113 for (
size_t i = 0;
i < this->observed_values.
size();
i++) {
1115 this->observed_values[
i].initial_value_m;
1119 for (
size_t i = 0;
i < this->expected_values.
size();
i++) {
1121 this->expected_values[
i].initial_value_m;
Rcpp interface that serves as the parent class for Rcpp distribution interfaces. This type should be ...
Definition rcpp_distribution.hpp:19
virtual bool set_observed_data(int observed_data_id)
Set the unique ID for the observed data object.
Definition rcpp_distribution.hpp:154
double lpdf_value
The log probability density function value.
Definition rcpp_distribution.hpp:76
virtual ~DistributionsInterfaceBase()
The destructor.
Definition rcpp_distribution.hpp:103
virtual double evaluate()=0
A method for each child distribution interface object to inherit so each distribution can have an eva...
std::shared_ptr< std::vector< uint32_t > > key_m
The unique ID for the variable map that points to a fims::Vector.
Definition rcpp_distribution.hpp:32
DistributionsInterfaceBase(const DistributionsInterfaceBase &other)
Construct a new Distributions Interface Base object.
Definition rcpp_distribution.hpp:93
uint32_t id_m
The local ID of the DistributionsInterfaceBase object.
Definition rcpp_distribution.hpp:28
virtual uint32_t get_id()=0
Get the ID for the child distribution interface objects to inherit.
SharedString use_mean_m
Control flag indicating whether to use the expected mean in the distribution calculations.
Definition rcpp_distribution.hpp:60
SharedInt interface_observed_data_id_m
The ID of the observed data object, which is set to -999.
Definition rcpp_distribution.hpp:71
virtual bool set_distribution_mean(double input_value)
Set the expected mean value for the distribution.
Definition rcpp_distribution.hpp:146
virtual bool set_distribution_links(std::string input_type, Rcpp::IntegerVector ids)
Sets pointers for data observations, random effects, or priors.
Definition rcpp_distribution.hpp:118
static uint32_t id_g
The static ID of the DistributionsInterfaceBase object.
Definition rcpp_distribution.hpp:24
static std::map< uint32_t, std::shared_ptr< DistributionsInterfaceBase > > live_objects
The map associating the ID of the DistributionsInterfaceBase to the DistributionsInterfaceBase object...
Definition rcpp_distribution.hpp:67
SharedString input_type_m
The type of density input. The options are prior, re, or data.
Definition rcpp_distribution.hpp:36
DistributionsInterfaceBase()
The constructor.
Definition rcpp_distribution.hpp:80
The Rcpp interface for Dlnorm to instantiate from R: dlnorm_ <- methods::new(DlnormDistribution).
Definition rcpp_distribution.hpp:536
virtual bool set_distribution_links(std::string input_type, Rcpp::IntegerVector ids)
Sets pointers for data observations, random effects, or priors.
Definition rcpp_distribution.hpp:611
DlnormDistributionsInterface(const DlnormDistributionsInterface &other)
Construct a new Dlnorm Distributions Interface object.
Definition rcpp_distribution.hpp:576
DlnormDistributionsInterface()
The constructor.
Definition rcpp_distribution.hpp:564
ParameterVector expected_values
The expected values, which would be the mean of log(x) for this distribution.
Definition rcpp_distribution.hpp:546
virtual std::string to_json()
Converts the data to json representation for the output.
Definition rcpp_distribution.hpp:725
virtual uint32_t get_id()
Gets the ID of the interface base object.
Definition rcpp_distribution.hpp:592
virtual double evaluate()
Evaluate lognormal probability density function (pdf). The natural log of the pdf is returned.
Definition rcpp_distribution.hpp:627
ParameterVector observed_values
Observed data.
Definition rcpp_distribution.hpp:541
ParameterVector log_sd
The uncertainty, which would be the natural logarithm of the standard deviation (sd) of log(x) for th...
Definition rcpp_distribution.hpp:554
virtual bool set_observed_data(int observed_data_id)
Set the unique ID for the observed data object.
Definition rcpp_distribution.hpp:598
virtual void finalize()
Extracts the derived quantities from Information to the Rcpp object.
Definition rcpp_distribution.hpp:649
virtual ~DlnormDistributionsInterface()
The destructor.
Definition rcpp_distribution.hpp:586
RealVector lpdf_vec
Vector that records the individual log probability function for each observation.
Definition rcpp_distribution.hpp:559
The Rcpp interface for Dmultinom to instantiate from R: dmultinom_ <- methods::new(DmultinomDistribut...
Definition rcpp_distribution.hpp:857
virtual bool set_distribution_links(std::string input_type, Rcpp::IntegerVector ids)
Sets pointers for data observations, random effects, or priors.
Definition rcpp_distribution.hpp:936
SharedString notes
TODO: document this.
Definition rcpp_distribution.hpp:884
virtual uint32_t get_id()
Gets the ID of the interface base object.
Definition rcpp_distribution.hpp:917
ParameterVector expected_values
The expected values, which should be a vector of length K where each value specifies the probability ...
Definition rcpp_distribution.hpp:868
void finalize()
Extracts derived quantities back to the Rcpp interface object from the Information object.
Definition rcpp_distribution.hpp:975
virtual double evaluate()
Definition rcpp_distribution.hpp:958
ParameterVector observed_values
Observed data, which should be a vector of length K of integers.
Definition rcpp_distribution.hpp:862
void set_note(std::string note)
Set the note object.
Definition rcpp_distribution.hpp:951
virtual bool set_observed_data(int observed_data_id)
Set the unique ID for the observed data object.
Definition rcpp_distribution.hpp:923
RealVector dims
The dimensions of the number of rows and columns of the multivariate dataset.
Definition rcpp_distribution.hpp:873
DmultinomDistributionsInterface()
The constructor.
Definition rcpp_distribution.hpp:889
virtual std::string to_json()
Converts the data to json representation for the output.
Definition rcpp_distribution.hpp:1041
RealVector lpdf_vec
Vector that records the individual log probability function for each observation.
Definition rcpp_distribution.hpp:878
DmultinomDistributionsInterface(const DmultinomDistributionsInterface &other)
Construct a new Dmultinom Distributions Interface object.
Definition rcpp_distribution.hpp:901
virtual ~DmultinomDistributionsInterface()
The destructor.
Definition rcpp_distribution.hpp:912
The Rcpp interface for Dnorm to instantiate from R: dnorm_ <- methods::new(DnormDistribution).
Definition rcpp_distribution.hpp:173
DnormDistributionsInterface(const DnormDistributionsInterface &other)
Construct a new Dnorm Distributions Interface object.
Definition rcpp_distribution.hpp:215
ParameterVector expected_mean
The expected mean, which would be the mean of x for this distribution.
Definition rcpp_distribution.hpp:188
DnormDistributionsInterface()
The constructor.
Definition rcpp_distribution.hpp:203
virtual std::string to_json()
Converts the data to json representation for the output.
Definition rcpp_distribution.hpp:385
virtual ~DnormDistributionsInterface()
The destructor.
Definition rcpp_distribution.hpp:226
RealVector lpdf_vec
Vector that records the individual log probability function for each observation.
Definition rcpp_distribution.hpp:198
virtual double evaluate()
Evaluate normal probability density function (pdf). The natural log of the pdf is returned.
Definition rcpp_distribution.hpp:272
ParameterVector expected_values
The expected values, which would be the mean of x for this distribution.
Definition rcpp_distribution.hpp:183
virtual void finalize()
Extracts the derived quantities from Information to the Rcpp object.
Definition rcpp_distribution.hpp:298
virtual bool set_observed_data(int observed_data_id)
Set the unique ID for the observed data object.
Definition rcpp_distribution.hpp:238
ParameterVector observed_values
Observed data.
Definition rcpp_distribution.hpp:178
virtual bool set_distribution_mean(double input_value)
Set the expected mean value for the distribution.
Definition rcpp_distribution.hpp:246
ParameterVector log_sd
The uncertainty, which would be the standard deviation of x for the normal distribution.
Definition rcpp_distribution.hpp:193
virtual bool set_distribution_links(std::string input_type, Rcpp::IntegerVector ids)
Sets pointers for data observations, random effects, or priors.
Definition rcpp_distribution.hpp:256
virtual uint32_t get_id()
Gets the ID of the interface base object.
Definition rcpp_distribution.hpp:232
Base class for all interface objects.
Definition rcpp_interface_base.hpp:575
bool finalized
Is the object already finalized? The default is false.
Definition rcpp_interface_base.hpp:580
std::string value_to_string(double value)
Report the parameter value as a string.
Definition rcpp_interface_base.hpp:616
static std::vector< std::shared_ptr< FIMSRcppInterfaceBase > > fims_interface_objects
FIMS interface object vectors.
Definition rcpp_interface_base.hpp:585
virtual bool add_to_fims_tmb()
A virtual method to inherit to add objects to the TMB model.
Definition rcpp_interface_base.hpp:590
An Rcpp interface class that defines the ParameterVector class.
Definition rcpp_interface_base.hpp:143
void resize(size_t size)
Resizes a ParameterVector to the desired length.
Definition rcpp_interface_base.hpp:288
size_t size()
Returns the size of a ParameterVector.
Definition rcpp_interface_base.hpp:281
uint32_t id_m
The local ID of the Parameter object.
Definition rcpp_interface_base.hpp:156
Parameter & get(size_t pos)
An internal accessor for calling a position of a ParameterVector from R.
Definition rcpp_interface_base.hpp:260
void set(size_t pos, const Parameter &p)
An internal setter for setting a position of a ParameterVector from R.
Definition rcpp_interface_base.hpp:276
An Rcpp interface class that defines the RealVector class.
Definition rcpp_interface_base.hpp:375
size_t size()
Returns the size of a RealVector.
Definition rcpp_interface_base.hpp:536
void resize(size_t size)
Resizes a RealVector to the desired length.
Definition rcpp_interface_base.hpp:543
A class that provides shared ownership of an integer value.
Definition rcpp_shared_primitive.hpp:24
void set(int val)
Change the value of the integer.
Definition rcpp_shared_primitive.hpp:129
A class that provides shared ownership of a string.
Definition rcpp_shared_primitive.hpp:1508
std::string get() const
Retrieves the string value managed by the object.
Definition rcpp_shared_primitive.hpp:1612
void set(std::string val)
Sets the string value of the object.
Definition rcpp_shared_primitive.hpp:1621
#define FIMS_WARNING_LOG(MESSAGE)
Definition def.hpp:639
#define FIMS_ERROR_LOG(MESSAGE)
Definition def.hpp:655
void clear_internal()
Clears the internal objects.
Definition rcpp_interface.hpp:235
The Rcpp interface to declare objects that are used ubiquitously throughout the Rcpp interface,...
fims::Vector< Type > observed_values
Input value of distribution function for priors or random effects.
Definition density_components_base.hpp:61
Type lpdf
Total log probability density contribution of the distribution.
Definition density_components_base.hpp:180
Implements the LogNormalLPDF distribution functor used by FIMS to evaluate observation-level and tota...
Definition lognormal_lpdf.hpp:35
Implements the MultinomialLPMF distribution functor used by FIMS to evaluate the observation-level an...
Definition multinomial_lpmf.hpp:37
Implements the NormalLPDF distribution functor used by FIMS to evaluate observation-level and total l...
Definition normal_lpdf.hpp:32
virtual const Type evaluate()
Evaluates the normal log probability density function.
Definition normal_lpdf.hpp:59