Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea-Havron-NOAA committed Aug 1, 2024
1 parent 99495fb commit e6fcd28
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions inst/include/population_dynamics/fleet/fleet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,29 +154,26 @@ struct Fleet : public fims_model_object::FIMSObject<Type> {
}
}

virtual const Type evaluate_age_comp() {
std::vector<Type> dims;
dims.resize(2);
dims[0] = this->x->get_imax();
dims[1] = this->x->get_jmax();


virtual void const Type evaluate_age_comp() {
for (size_t y = 0; y < this->nyears; y++) {
Type sum = 0.0;
for (size_t a = 0; a < this->nages; a++) {
size_t i_age_year = y * this->nages + a;
sum += this->catch_numbers_at_age[i_age_year];
}
for (size_t a = 0; a < this->nages; a++) {
size_t i_age_year = y * this->nages + a;
this->catch_numbers_at_age[i_age_year] = this->catch_numbers_at_age[i_age_year] /
sum;

}
}
}

virtual const Type evaluate_index() {
expected_index[i] = log(this->expected_index[i]);
virtual void const Type evaluate_index() {
for(size_t i=0; i<this->expected_index.size(); i++){
expected_index[i] = log(this->expected_index[i]);
}
}
};

Expand Down

0 comments on commit e6fcd28

Please sign in to comment.