forked from pressel/pycles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLookup.pxd
More file actions
25 lines (22 loc) · 668 Bytes
/
Lookup.pxd
File metadata and controls
25 lines (22 loc) · 668 Bytes
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
cdef extern from "lookup.h":
struct LookupStruct:
int n_table
double y_max
double y_min
double x_max
double x_min
double dx
double dxi
double* table_values
void init_table(LookupStruct *LT, long n, double *x, double *y) nogil
void free_table(LookupStruct *LT) nogil
double lookup(LookupStruct * LT, double x) nogil
cdef class Lookup:
cdef:
LookupStruct LookupStructC
cpdef initialize(self, double[:] x, double[:] y)
cpdef finalize(self)
cpdef table_bounds(self)
cpdef lookup(self, double x)
cdef:
inline double fast_lookup(self, double x) nogil