Fix bug: scale rays only once

This commit is contained in:
2017-04-30 10:11:58 -04:00
parent 1e45817d76
commit c6a3043798
3 changed files with 3 additions and 7 deletions

View File

@@ -540,8 +540,8 @@ int INFINITY_2D_generate_lfree(const struct MultiRowModel *model,
lfree->nrows = 2;
lfree->rays.nrays = nrays;
memcpy(f, model->f, 2 * sizeof(double));
memcpy(rays, model->rays.values, 2 * nrays * sizeof(double));
memcpy(f, model->f, 2 * sizeof(double));
for (int i = 0; i < nrays; i++) beta[i] = GREEDY_BIG_E;
scale = (double*) malloc(nrays * sizeof(double));
@@ -721,9 +721,6 @@ int INFINITY_2D_generate_lfree(const struct MultiRowModel *model,
if(is_split) break;
}
for(int i=0; i<nrays; i++)
beta[i] *= scale[i];
CLEANUP:
if(scale) free(scale);
return rval;