Починил, понял, что неверно работает функция

This commit is contained in:
AZEN-SGG 2024-12-21 01:05:32 +03:00
parent 610ed3990a
commit c14c8ef9c2
4 changed files with 64 additions and 70 deletions

View file

@ -3,30 +3,24 @@
#include "hope.h"
int main(void) {
points * pts;
points pts;
point N[3];
circle crcl;
pts = getPoints(file);
if (pts == NULL) return -1;
/*
printf("\nPoints:\n");
for (int i = 0; i < ps.length; ++i) printf("(%.2lf, %.2lf) ", ps.array[i].x, ps.array[i].y);
printf("\n\n");
*/
pts = getPoints();
if (pts.array == NULL) return -1;
printPoints(*pts);
printPoints(pts);
printf("\nFast algorithm:\n");
crcl = MEC(ps->array, ps->length, N, 0);
crcl = MEC(pts.array, pts.length, N, 0);
printCircle(crcl);
printf("\nReliable algorithm:\n");
crcl = hope(ps->array, ps->length);
crcl = hope(pts.array, pts.length);
printCircle(crcl);
free(ps->array);
free(pts.array);
return 0;
}