Skip to content

Commit

Permalink
Removed est_count from calculation of RGroup relative size, resolved …
Browse files Browse the repository at this point in the history
…issue #366
  • Loading branch information
kpalmqui committed Jul 26, 2019
1 parent d62551e commit 43f180f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ST_resgroups.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,17 +737,18 @@ void rgroup_IncrAges(void)
/* Sums relsize for all individuals in all species in RGroup rg.
param rg = RGroup index.
Return: RGroup relsize. */

RealF getRGroupRelsize(GrpIndex rg){
Int n;
SppIndex sp;
double sum = 0.0;

ForEachEstSpp( sp, rg, n){
sum += getSpeciesRelsize(sp);
sum += getSpeciesRelsize(sp);
}

if(RGroup[rg]->est_count > 0){
return (RealF) sum / (RealF) RGroup[rg]->est_count;
return (RealF) sum;
} else {
return 0;
}
Expand Down

0 comments on commit 43f180f

Please sign in to comment.