Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
Fix end of ENV assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
guimspace committed May 21, 2021
1 parent 63f4c4b commit 20e2724
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions c/src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,22 @@ float get_element(env envelope, int indL, int indC)

void print_envelope(env envelope)
{
int n = envelope->n;
int i;

for (i = 0; i < envelope->n; i++)
for (i = 0; i < n; i++)
printf("%.2f\t", envelope->diagg[i]);
printf("\n");

i = -1;
do {
i++;
for (i = 0; i <= envelope->enveCol[n]; i++)
printf("%.2f\t", envelope->enve[i]);
} while (envelope->enve[i] != -1);
printf("\n");

for (i = 0; i <= envelope->n; i++)
for (i = 0; i <= n; i++)
printf("%d\t", envelope->enveCol[i]);
printf("\n");

for (i = 0; i < envelope->n; i++)
for (i = 0; i < n; i++)
printf("%d\t", envelope->enveLin[i]);
printf("\n");
}
Expand Down
2 changes: 1 addition & 1 deletion c/src/wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void build_envelope(env envelope, float *matrix, bool isLine)
j++;
}

enve[p] = -1;
enve[p] = 0;

enve = realloc(enve, (1 + p) * sizeof(float));

Expand Down

0 comments on commit 20e2724

Please sign in to comment.