|
@@ -123,7 +123,7 @@ int calculate(int fd, struct area_entry *ad, double *result)
|
|
|
long area = 0;
|
|
|
|
|
|
avl_tree albero = NULL;
|
|
|
- AVL_table *array;
|
|
|
+ AVL_table array;
|
|
|
generic_cell uc;
|
|
|
|
|
|
uc.t = CELL_TYPE;
|
|
@@ -269,7 +269,7 @@ int calculate(int fd, struct area_entry *ad, double *result)
|
|
|
/* calculate simpson */
|
|
|
simpson = 0;
|
|
|
for (i = 0; i < m; i++) {
|
|
|
- t = (double)(array[i]->tot);
|
|
|
+ t = (double)(array[i].tot);
|
|
|
p = t / area;
|
|
|
simpson += (p * p);
|
|
|
}
|
|
@@ -309,7 +309,7 @@ int calculateD(int fd, struct area_entry *ad, double *result)
|
|
|
long area = 0;
|
|
|
|
|
|
avl_tree albero = NULL;
|
|
|
- AVL_table *array;
|
|
|
+ AVL_table array;
|
|
|
generic_cell uc;
|
|
|
|
|
|
uc.t = DCELL_TYPE;
|
|
@@ -455,7 +455,7 @@ int calculateD(int fd, struct area_entry *ad, double *result)
|
|
|
/* calculate simpson */
|
|
|
simpson = 0;
|
|
|
for (i = 0; i < m; i++) {
|
|
|
- t = (double)(array[i]->tot);
|
|
|
+ t = (double)(array[i].tot);
|
|
|
p = t / area;
|
|
|
simpson += (p * p);
|
|
|
}
|
|
@@ -495,7 +495,7 @@ int calculateF(int fd, struct area_entry *ad, double *result)
|
|
|
long area = 0;
|
|
|
|
|
|
avl_tree albero = NULL;
|
|
|
- AVL_table *array;
|
|
|
+ AVL_table array;
|
|
|
generic_cell uc;
|
|
|
|
|
|
uc.t = FCELL_TYPE;
|
|
@@ -641,7 +641,7 @@ int calculateF(int fd, struct area_entry *ad, double *result)
|
|
|
/* calculate simpson */
|
|
|
simpson = 0;
|
|
|
for (i = 0; i < m; i++) {
|
|
|
- t = (double)(array[i]->tot);
|
|
|
+ t = (double)(array[i].tot);
|
|
|
p = t / area;
|
|
|
simpson += (p * p);
|
|
|
}
|