summaryrefslogtreecommitdiff
path: root/lib/convex.h
blob: 29f4ae0f211b803a5e7514426943709b0612f54c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#pragma once

#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>

typedef struct {
  uint64_t x;
  double y;
} point_t;

typedef struct list_tag {
  struct list_tag *prev;
  struct list_tag *next;
  point_t *p;
} list_t;

double *get_convex_minorant(uint64_t n, double *Gammas);