Skip to content

Commit

Permalink
remove evaluate_lpdf
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea-Havron-NOAA committed Aug 1, 2024
1 parent b04f6db commit 17eb407
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
3 changes: 1 addition & 2 deletions inst/include/interface/rcpp/rcpp_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,7 @@ RCPP_MODULE(fims) {
.method("get_id", &BevertonHoltRecruitmentInterface::get_id)
.field("log_sigma_recruit",
&BevertonHoltRecruitmentInterface::log_sigma_recruit)
.method("evaluate", &BevertonHoltRecruitmentInterface::evaluate)
.method("evaluate_lpdf", &BevertonHoltRecruitmentInterface::evaluate_lpdf);
.method("evaluate", &BevertonHoltRecruitmentInterface::evaluate);

Rcpp::class_<FleetInterface>("Fleet")
.constructor()
Expand Down
13 changes: 0 additions & 13 deletions inst/include/interface/rcpp/rcpp_objects/rcpp_recruitment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,6 @@ class BevertonHoltRecruitmentInterface : public RecruitmentInterfaceBase {
return BevHolt.evaluate(spawners, ssbzero);
}

virtual double evaluate_lpdf() {
fims_popdy::SRBevertonHolt<double> LPDF;
LPDF.log_sigma_recruit.resize(1);
LPDF.log_sigma_recruit[0] = this->log_sigma_recruit.value_m;
LPDF.log_recruit_devs.resize(log_devs.size()); // Vector from TMB
for (int i = 0; i < log_devs.size(); i++) {
LPDF.log_recruit_devs[i] = log_devs[i].value_m;
RECRUITMENT_LOG << "Log recruit devs being passed to C++ are " << log_devs[i].value_m
<< std::endl;
}
LPDF.estimate_log_recruit_devs = this->estimate_log_devs;
return LPDF.evaluate_lpdf();
}

#ifdef TMB_MODEL

Expand Down

0 comments on commit 17eb407

Please sign in to comment.