-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathc_api.h
72 lines (55 loc) · 1.47 KB
/
c_api.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// Created by Bryn Keller on 11/16/17.
//
#ifndef RIVET_CONSOLE_C_API_H
#define RIVET_CONSOLE_C_API_H
#include <cstdlib>
extern "C" {
//typedef struct {
// unsigned dimensions;
// double max_distance;
// double * data;
// char * param1_name;
// char * param2_name;
//} PointCloud;
//
typedef struct {
void * input_params;
void * template_points;
void * arrangement;
} Computed;
typedef struct {
double birth;
double death;
unsigned multiplicity;
} Bar;
typedef struct {
Bar* bars;
size_t length;
double angle;
double offset;
} BarCode;
typedef struct {
BarCode* barcodes;
size_t length;
} BarCodesResult;
typedef struct {
double x_low;
double y_low;
double x_high;
double y_high;
} ArrangementBounds;
struct rivet_comp;
typedef rivet_comp RivetComputation;
RivetComputation * read_rivet_computation(const char* bytes, size_t length);
//Computed* compute_arrangement_from_point_cloud(PointCloud);
BarCodesResult* barcodes_from_computation(RivetComputation* rivet_computation,
double* offsets,
double* angles,
size_t query_length
);
ArrangementBounds bounds_from_computation(RivetComputation* rivet_computation);
void free_rivet_computation(RivetComputation * rivet_computation);
void free_barcodes_result(BarCodesResult *result);
}
#endif //RIVET_CONSOLE_C_API_H