- for(int j = 1; j < rank->size(); j++)
- sum += pow(1 - (double)rank->get(j) / n, n) * (1 - pow(1 - (double)rank->get(j) / n, m)) + v * pow(1 - f1/(n*v), n) * (1 - pow(1 - f1/(n*v), m));
-
+ for(int j = 1; j < sabund->size(); j++) {
+ for (int i = 0; i < sabund->get(j); i++) {
+ sum += pow(1 - j / n, n) * (1 - pow(1 - j / n, f));
+ }
+ }
+ sum += v * pow(1 - f1/(n*v), n) * (1 - pow(1 - f1/(n*v), f));