From 2af9351db3aa97da9b0d3f23d53a593bc96c8a8e Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Fri, 2 Feb 2018 18:33:22 -0500 Subject: does potts now, no external libraries --- lib/convex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/convex.c') diff --git a/lib/convex.c b/lib/convex.c index 096504d..df506f9 100644 --- a/lib/convex.c +++ b/lib/convex.c @@ -5,7 +5,7 @@ double slope(point_t *P, point_t *Q) { return (Q->y - P->y) / ((double)(Q->x) - (double)(P->x)); } -double *get_convex_minorant(uint64_t n, double *Gammas) { +double *get_convex_minorant(count_t n, double *Gammas) { if (n < 2) { return Gammas; } @@ -17,7 +17,7 @@ double *get_convex_minorant(uint64_t n, double *Gammas) { list_t *pos = L; - for (uint64_t i = 1; i < n; i++) { + for (count_t i = 1; i < n; i++) { pos->next = (list_t *)calloc(1, sizeof(list_t)); pos->next->p = (point_t *)calloc(1, sizeof(point_t)); pos->next->p->x = i; @@ -69,7 +69,7 @@ double *get_convex_minorant(uint64_t n, double *Gammas) { double *g = (double *)calloc(n + 1, sizeof(double)); double rho = 0; - for (uint64_t i = 0; i < n + 1; i++) { + for (count_t i = 0; i < n + 1; i++) { if (i > pos->next->p->x) { pos = pos->next; } @@ -87,7 +87,7 @@ double *get_convex_minorant(uint64_t n, double *Gammas) { } } - for (uint64_t i = 0; i < n + 1; i++) { + for (count_t i = 0; i < n + 1; i++) { g[i] += rho / 2; } -- cgit v1.2.3-70-g09d2