Fix bug: scale rays only once
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user