9#ifndef FIMS_INTERFACE_RCPP_RCPP_OBJECTS_RCPP_DISTRIBUTION_HPP
10#define FIMS_INTERFACE_RCPP_RCPP_OBJECTS_RCPP_DISTRIBUTION_HPP
12#include "../../../distributions/distributions.hpp"
13#include "../../interface.hpp"
33 std::shared_ptr<std::vector<uint32_t>>
key_m;
67 static std::map<uint32_t, std::shared_ptr<DistributionsInterfaceBase>>
82 this->key_m = std::make_shared<std::vector<uint32_t>>();
120 Rcpp::IntegerVector
ids) {
167std::map<uint32_t, std::shared_ptr<DistributionsInterfaceBase>>
206 std::make_shared<DnormDistributionsInterface>(*
this);
248 this->expected_mean[0].initial_value_m =
input_value;
249 this->expected_mean[0].estimation_type_m.
set(
"fixed_effects");
258 Rcpp::IntegerVector
ids) {
260 this->
key_m->resize(ids.size());
276 dnorm.expected_values.resize(this->expected_values.
size());
277 dnorm.log_sd.resize(this->log_sd.
size());
278 dnorm.expected_mean.resize(this->expected_mean.
size());
279 for (
size_t i = 0;
i <
x.
size();
i++) {
280 dnorm.x[
i] = this->x[
i].initial_value_m;
283 dnorm.expected_values[
i] = this->expected_values[
i].initial_value_m;
286 dnorm.log_sd[
i] = this->log_sd[
i].initial_value_m;
289 dnorm.expected_mean[
i] = this->expected_mean[
i].initial_value_m;
303 " has been finalized already.");
308 std::shared_ptr<fims_info::Information<double>>
info =
314 it =
info->density_components.find(this->
id_m);
318 " not found in Information.");
321 std::shared_ptr<fims_distributions::NormalLPDF<double>>
dnorm =
322 std::dynamic_pointer_cast<fims_distributions::NormalLPDF<double>>(
331 if (this->log_sd.
size() !=
n_x) {
333 if (this->log_sd.
size() == 1) {
334 auto tmp = this->log_sd[0];
336 for (
size_t i = 0;
i <
n_x; ++
i) {
337 this->log_sd[
i] =
tmp;
342 "log_sd size does not match number of observations and is not "
346 for (
size_t i = 0;
i <
n_x;
i++) {
347 if (this->log_sd[
i].estimation_type_m.
get() ==
"constant") {
348 this->log_sd[
i].final_value_m = this->log_sd[
i].initial_value_m;
350 this->log_sd[
i].final_value_m =
dnorm->log_sd.get_force_scalar(
i);
354 for (
size_t i = 0;
i < this->expected_mean.
size();
i++) {
355 if (this->expected_mean[
i].estimation_type_m.
get() ==
"constant") {
356 this->expected_mean[
i].final_value_m =
357 this->expected_mean[
i].initial_value_m;
359 this->expected_mean[
i].final_value_m =
dnorm->expected_mean[
i];
364 if (this->expected_values.
size() == 1) {
367 if (this->x.
size() == 1) {
371 for (
size_t i = 0;
i < this->lpdf_vec.
size();
i++) {
372 this->lpdf_vec[
i] =
dnorm->report_lpdf_vec[
i];
373 this->expected_values[
i].final_value_m =
dnorm->get_expected(
i);
374 this->x[
i].final_value_m =
dnorm->get_observed(
i);
387 std::stringstream
ss;
390 ss <<
" \"module_name\": \"density\",\n";
391 ss <<
" \"module_id\": " << this->
id_m <<
",\n";
392 ss <<
" \"module_type\": \"normal\",\n";
395 ss <<
" \"input_type\" : \"" << this->
input_type_m <<
"\",\n";
396 ss <<
" \"density_component\": {\n";
398 ss <<
" \"value\":[";
399 if (this->lpdf_vec.
size() == 0) {
402 for (
size_t i = 0;
i < this->lpdf_vec.
size() - 1;
i++) {
410 ss <<
" \"expected_values\":[";
411 if (this->expected_values.
size() == 0) {
414 for (
size_t i = 0;
i < this->expected_values.
size() - 1;
i++) {
419 this->expected_values[this->expected_values.
size() - 1]
423 ss <<
" \"log_sd_values\":[";
424 if (this->log_sd.
size() == 0) {
432 this->log_sd[this->log_sd.
size() - 1].final_value_m)
435 ss <<
" \"observed_values\":[";
436 if (this->x.
size() == 0) {
439 for (
size_t i = 0;
i < this->x.
size() - 1;
i++) {
440 ss << this->x[
i].final_value_m <<
", ";
442 ss << this->x[this->x.
size() - 1].final_value_m <<
"]\n";
450 template <
typename Type>
452 std::shared_ptr<fims_info::Information<Type>>
info =
455 std::shared_ptr<fims_distributions::NormalLPDF<Type>>
distribution =
456 std::make_shared<fims_distributions::NormalLPDF<Type>>();
461 std::stringstream
ss;
463 distribution->key.resize(this->
key_m->size());
464 for (
size_t i = 0;
i < this->
key_m->size();
i++) {
465 distribution->key[
i] = this->
key_m->at(
i);
467 distribution->id = this->
id_m;
468 distribution->x.resize(this->x.
size());
469 for (
size_t i = 0;
i < this->x.
size();
i++) {
474 for (
size_t i = 0;
i < this->expected_values.
size();
i++) {
476 this->expected_values[
i].initial_value_m;
479 for (
size_t i = 0;
i < this->log_sd.
size();
i++) {
481 if (this->log_sd[
i].estimation_type_m.
get() ==
"fixed_effects") {
483 ss <<
"dnorm." << this->
id_m <<
".log_sd." << this->log_sd[
i].
id_m;
484 info->RegisterParameterName(
ss.str());
487 if (this->log_sd[
i].estimation_type_m.
get() ==
"random_effects") {
488 FIMS_ERROR_LOG(
"standard deviations cannot be set to random effects");
494 distribution->expected_mean.resize(this->expected_mean.
size());
495 for (
size_t i = 0;
i < this->expected_mean.
size();
i++) {
496 distribution->expected_mean[
i] = this->expected_mean[
i].initial_value_m;
497 if (this->expected_mean[
i].estimation_type_m.
get() ==
"fixed_effects") {
499 ss <<
"dnorm." << this->
id_m <<
".expected_mean."
500 << this->expected_mean[
i].
id_m;
501 info->RegisterParameterName(
ss.str());
504 if (this->expected_mean[
i].estimation_type_m.
get() ==
"random_effects") {
508 info->variable_map[this->expected_mean.
id_m] =
521#ifdef TMBAD_FRAMEWORK
571 std::make_shared<DlnormDistributionsInterface>(*
this);
617 Rcpp::IntegerVector
ids) {
619 this->
key_m->resize(ids.size());
635 dlnorm.expected_values.resize(this->expected_values.
size());
638 for (
size_t i = 0;
i <
x.
size();
i++) {
639 dlnorm.x[
i] = this->x[
i].initial_value_m;
642 dlnorm.expected_values[
i] = this->expected_values[
i].initial_value_m;
645 dlnorm.log_sd[
i] = this->log_sd[
i].initial_value_m;
658 " has been finalized already.");
663 std::shared_ptr<fims_info::Information<double>>
info =
669 it =
info->density_components.find(this->
id_m);
673 " not found in Information.");
676 std::shared_ptr<fims_distributions::LogNormalLPDF<double>>
dlnorm =
677 std::dynamic_pointer_cast<fims_distributions::LogNormalLPDF<double>>(
684 if (this->log_sd.
size() !=
n_x) {
686 if (this->log_sd.
size() == 1) {
687 auto tmp = this->log_sd[0];
689 for (
size_t i = 0;
i <
n_x; ++
i) {
690 this->log_sd[
i] =
tmp;
695 "log_sd size does not match number of observations and is not "
700 for (
size_t i = 0;
i <
n_x;
i++) {
701 if (this->log_sd[
i].estimation_type_m.
get() ==
"constant") {
702 this->log_sd[
i].final_value_m = this->log_sd[
i].initial_value_m;
704 this->log_sd[
i].final_value_m =
dlnorm->log_sd.get_force_scalar(
i);
709 if (this->expected_values.
size() == 1) {
712 if (this->x.
size() == 1) {
715 for (
size_t i = 0;
i < this->lpdf_vec.
size();
i++) {
716 this->lpdf_vec[
i] =
dlnorm->report_lpdf_vec[
i];
717 this->expected_values[
i].final_value_m =
dlnorm->get_expected(
i);
718 this->x[
i].final_value_m =
dlnorm->get_observed(
i);
731 std::stringstream
ss;
734 ss <<
" \"module_name\": \"density\",\n";
735 ss <<
" \"module_id\": " << this->
id_m <<
",\n";
736 ss <<
" \"module_type\": \"log_normal\",\n";
739 ss <<
" \"input_type\" : \"" << this->
input_type_m <<
"\",\n";
740 ss <<
" \"density_component\": {\n";
742 ss <<
" \"value\":[";
743 if (this->lpdf_vec.
size() == 0) {
746 for (
size_t i = 0;
i < this->lpdf_vec.
size() - 1;
i++) {
753 ss <<
" \"expected_values\":[";
754 if (this->expected_values.
size() == 0) {
757 for (
size_t i = 0;
i < this->expected_values.
size() - 1;
i++) {
762 this->expected_values[this->expected_values.
size() - 1]
767 ss <<
" \"log_sd_values\":[";
768 if (this->log_sd.
size() == 0) {
776 this->log_sd[this->log_sd.
size() - 1].final_value_m)
779 ss <<
" \"observed_values\":[";
780 if (this->x.
size() == 0) {
783 for (
size_t i = 0;
i < this->x.
size() - 1;
i++) {
784 ss << this->x[
i].final_value_m <<
", ";
786 ss << this->x[this->x.
size() - 1].final_value_m <<
"]\n";
794 template <
typename Type>
796 std::shared_ptr<fims_info::Information<Type>>
info =
799 std::shared_ptr<fims_distributions::LogNormalLPDF<Type>>
distribution =
800 std::make_shared<fims_distributions::LogNormalLPDF<Type>>();
804 std::stringstream
ss;
807 distribution->key.resize(this->
key_m->size());
808 for (
size_t i = 0;
i < this->
key_m->size();
i++) {
809 distribution->key[
i] = this->
key_m->at(
i);
811 distribution->x.resize(this->x.
size());
812 for (
size_t i = 0;
i < this->x.
size();
i++) {
817 for (
size_t i = 0;
i < this->expected_values.
size();
i++) {
819 this->expected_values[
i].initial_value_m;
822 for (
size_t i = 0;
i < this->log_sd.
size();
i++) {
824 if (this->log_sd[
i].estimation_type_m.
get() ==
"fixed_effects") {
826 ss <<
"dlnorm." << this->
id_m <<
".log_sd." << this->log_sd[
i].
id_m;
827 info->RegisterParameterName(
ss.str());
830 if (this->log_sd[
i].estimation_type_m.
get() ==
"random_effects") {
831 FIMS_ERROR_LOG(
"standard deviations cannot be set to random effects");
846#ifdef TMBAD_FRAMEWORK
900 std::make_shared<DmultinomDistributionsInterface>(*
this);
946 Rcpp::IntegerVector
ids) {
948 this->
key_m->resize(ids.size());
971 dmultinom.expected_values.resize(this->expected_values.
size());
972 for (
size_t i = 0;
i <
x.
size();
i++) {
976 dmultinom.expected_values[
i] = this->expected_values[
i].initial_value_m;
988 fims::to_string(this->
id_m) +
989 " has been finalized already.");
994 std::shared_ptr<fims_info::Information<double>>
info =
1000 it =
info->density_components.find(this->
id_m);
1004 " not found in Information.");
1007 std::shared_ptr<fims_distributions::MultinomialLPMF<double>>
dmultinom =
1008 std::dynamic_pointer_cast<
1014 this->lpdf_vec = Rcpp::NumericVector(
n_x);
1015 if (this->expected_values.
size() !=
n_x) {
1021 for (
size_t i = 0;
i < this->lpdf_vec.
size();
i++) {
1022 this->lpdf_vec[
i] =
dmultinom->report_lpdf_vec[
i];
1023 this->expected_values[
i].final_value_m =
dmultinom->get_expected(
i);
1025 this->x[
i].final_value_m =
dmultinom->get_observed(
i);
1032 for (
size_t i = 0;
i <
dims[0];
i++) {
1033 for (
size_t j = 0;
j <
dims[1];
j++) {
1036 static_cast<size_t>(
i),
static_cast<size_t>(
j));
1051 std::stringstream
ss;
1054 ss <<
" \"module_name\": \"density\",\n";
1055 ss <<
" \"module_id\": " << this->
id_m <<
",\n";
1056 ss <<
" \"module_type\": \"multinomial\",\n";
1059 ss <<
" \"input_type\" : \"" << this->
input_type_m <<
"\",\n";
1060 ss <<
" \"density_component\": {\n";
1061 ss <<
" \"lpdf_value\": " << this->
lpdf_value <<
",\n";
1062 ss <<
" \"value\":[";
1063 if (this->lpdf_vec.
size() == 0) {
1066 for (
size_t i = 0;
i < this->lpdf_vec.
size() - 1;
i++) {
1074 ss <<
" \"expected_values\":[";
1075 if (this->expected_values.
size() == 0) {
1078 for (
size_t i = 0;
i < this->expected_values.
size() - 1;
i++) {
1083 this->expected_values[this->expected_values.
size() - 1]
1089 ss <<
" \"observed_values\":[";
1090 if (this->x.
size() == 0) {
1093 for (
size_t i = 0;
i < this->x.
size() - 1;
i++) {
1094 ss << this->x[
i].final_value_m <<
", ";
1096 ss << this->x[this->x.
size() - 1].final_value_m <<
"]\n";
1104 template <
typename Type>
1107 std::shared_ptr<fims_info::Information<Type>>
info =
1110 std::shared_ptr<fims_distributions::MultinomialLPMF<Type>>
distribution =
1111 std::make_shared<fims_distributions::MultinomialLPMF<Type>>();
1116 distribution->key.resize(this->
key_m->size());
1117 for (
size_t i = 0;
i < this->
key_m->size();
i++) {
1118 distribution->key[
i] = this->
key_m->at(
i);
1120 distribution->x.resize(this->x.
size());
1121 for (
size_t i = 0;
i < this->x.
size();
i++) {
1126 for (
size_t i = 0;
i < this->expected_values.
size();
i++) {
1128 this->expected_values[
i].initial_value_m;
1137#ifdef TMBAD_FRAMEWORK
Rcpp interface that serves as the parent class for Rcpp distribution interfaces. This type should be ...
Definition rcpp_distribution.hpp:20
virtual bool set_observed_data(int observed_data_id)
Set the unique ID for the observed data object.
Definition rcpp_distribution.hpp:155
double lpdf_value
The log probability density function value.
Definition rcpp_distribution.hpp:77
virtual ~DistributionsInterfaceBase()
The destructor.
Definition rcpp_distribution.hpp:104
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:33
DistributionsInterfaceBase(const DistributionsInterfaceBase &other)
Construct a new Distributions Interface Base object.
Definition rcpp_distribution.hpp:94
uint32_t id_m
The local ID of the DistributionsInterfaceBase object.
Definition rcpp_distribution.hpp:29
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:61
SharedInt interface_observed_data_id_m
The ID of the observed data object, which is set to -999.
Definition rcpp_distribution.hpp:72
virtual bool set_distribution_mean(double input_value)
Set the expected mean value for the distribution.
Definition rcpp_distribution.hpp:147
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:119
static uint32_t id_g
The static ID of the DistributionsInterfaceBase object.
Definition rcpp_distribution.hpp:25
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:68
SharedString input_type_m
The type of density input. The options are prior, re, or data.
Definition rcpp_distribution.hpp:37
DistributionsInterfaceBase()
The constructor.
Definition rcpp_distribution.hpp:81
The Rcpp interface for Dlnorm to instantiate from R: dlnorm_ <- methods::new(DlnormDistribution).
Definition rcpp_distribution.hpp:541
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:616
DlnormDistributionsInterface(const DlnormDistributionsInterface &other)
Construct a new Dlnorm Distributions Interface object.
Definition rcpp_distribution.hpp:581
DlnormDistributionsInterface()
The constructor.
Definition rcpp_distribution.hpp:569
ParameterVector expected_values
The expected values, which would be the mean of log(x) for this distribution.
Definition rcpp_distribution.hpp:551
virtual std::string to_json()
Converts the data to json representation for the output.
Definition rcpp_distribution.hpp:730
virtual uint32_t get_id()
Gets the ID of the interface base object.
Definition rcpp_distribution.hpp:597
virtual double evaluate()
Evaluate lognormal probability density function (pdf). The natural log of the pdf is returned.
Definition rcpp_distribution.hpp:632
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:559
virtual bool set_observed_data(int observed_data_id)
Set the unique ID for the observed data object.
Definition rcpp_distribution.hpp:603
ParameterVector x
Observed data.
Definition rcpp_distribution.hpp:546
virtual void finalize()
Extracts the derived quantities from Information to the Rcpp object.
Definition rcpp_distribution.hpp:654
virtual ~DlnormDistributionsInterface()
The destructor.
Definition rcpp_distribution.hpp:591
RealVector lpdf_vec
Vector that records the individual log probability function for each observation.
Definition rcpp_distribution.hpp:564
The Rcpp interface for Dmultinom to instantiate from R: dmultinom_ <- methods::new(DmultinomDistribut...
Definition rcpp_distribution.hpp:866
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:945
SharedString notes
TODO: document this.
Definition rcpp_distribution.hpp:893
virtual uint32_t get_id()
Gets the ID of the interface base object.
Definition rcpp_distribution.hpp:926
ParameterVector x
Observed data, which should be a vector of length K of integers.
Definition rcpp_distribution.hpp:871
ParameterVector expected_values
The expected values, which should be a vector of length K where each value specifies the probability ...
Definition rcpp_distribution.hpp:877
void finalize()
Extracts derived quantities back to the Rcpp interface object from the Information object.
Definition rcpp_distribution.hpp:984
virtual double evaluate()
Definition rcpp_distribution.hpp:967
void set_note(std::string note)
Set the note object.
Definition rcpp_distribution.hpp:960
virtual bool set_observed_data(int observed_data_id)
Set the unique ID for the observed data object.
Definition rcpp_distribution.hpp:932
RealVector dims
The dimensions of the number of rows and columns of the multivariate dataset.
Definition rcpp_distribution.hpp:882
DmultinomDistributionsInterface()
The constructor.
Definition rcpp_distribution.hpp:898
virtual std::string to_json()
Converts the data to json representation for the output.
Definition rcpp_distribution.hpp:1050
RealVector lpdf_vec
Vector that records the individual log probability function for each observation.
Definition rcpp_distribution.hpp:887
DmultinomDistributionsInterface(const DmultinomDistributionsInterface &other)
Construct a new Dmultinom Distributions Interface object.
Definition rcpp_distribution.hpp:910
virtual ~DmultinomDistributionsInterface()
The destructor.
Definition rcpp_distribution.hpp:921
The Rcpp interface for Dnorm to instantiate from R: dnorm_ <- methods::new(DnormDistribution).
Definition rcpp_distribution.hpp:174
ParameterVector x
Observed data.
Definition rcpp_distribution.hpp:179
DnormDistributionsInterface(const DnormDistributionsInterface &other)
Construct a new Dnorm Distributions Interface object.
Definition rcpp_distribution.hpp:216
ParameterVector expected_mean
The expected mean, which would be the mean of x for this distribution.
Definition rcpp_distribution.hpp:189
DnormDistributionsInterface()
The constructor.
Definition rcpp_distribution.hpp:204
virtual std::string to_json()
Converts the data to json representation for the output.
Definition rcpp_distribution.hpp:386
virtual ~DnormDistributionsInterface()
The destructor.
Definition rcpp_distribution.hpp:227
RealVector lpdf_vec
Vector that records the individual log probability function for each observation.
Definition rcpp_distribution.hpp:199
virtual double evaluate()
Evaluate normal probability density function (pdf). The natural log of the pdf is returned.
Definition rcpp_distribution.hpp:273
ParameterVector expected_values
The expected values, which would be the mean of x for this distribution.
Definition rcpp_distribution.hpp:184
virtual void finalize()
Extracts the derived quantities from Information to the Rcpp object.
Definition rcpp_distribution.hpp:299
virtual bool set_observed_data(int observed_data_id)
Set the unique ID for the observed data object.
Definition rcpp_distribution.hpp:239
virtual bool set_distribution_mean(double input_value)
Set the expected mean value for the distribution.
Definition rcpp_distribution.hpp:247
ParameterVector log_sd
The uncertainty, which would be the standard deviation of x for the normal distribution.
Definition rcpp_distribution.hpp:194
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:257
virtual uint32_t get_id()
Gets the ID of the interface base object.
Definition rcpp_distribution.hpp:233
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
std::string value_to_string(double value)
Report the parameter value as a string.
Definition rcpp_interface_base.hpp:712
static std::vector< std::shared_ptr< FIMSRcppInterfaceBase > > fims_interface_objects
FIMS interface object vectors.
Definition rcpp_interface_base.hpp:644
virtual bool add_to_fims_tmb()
A virtual method to inherit to add objects to the TMB model.
Definition rcpp_interface_base.hpp:649
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
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:311
An Rcpp interface class that defines the RealVector class.
Definition rcpp_interface_base.hpp:434
size_t size()
Returns the size of a RealVector.
Definition rcpp_interface_base.hpp:595
void resize(size_t size)
Resizes a RealVector to the desired length.
Definition rcpp_interface_base.hpp:602
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:598
#define FIMS_INFO_LOG(MESSAGE)
Definition def.hpp:590
#define FIMS_ERROR_LOG(MESSAGE)
Definition def.hpp:606
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,...
fims::Vector< Type > x
Definition density_components_base.hpp:41
Definition lognormal_lpdf.hpp:22
Definition multinomial_lpmf.hpp:22
Type lpdf
Definition multinomial_lpmf.hpp:23
Definition normal_lpdf.hpp:23
virtual const Type evaluate()
Evaluates the normal probability density function.
Definition normal_lpdf.hpp:40