forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhashtable.pxd
62 lines (45 loc) · 1.32 KB
/
hashtable.pxd
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
from numpy cimport ndarray
from pandas._libs.khash cimport (
float64_t,
int64_t,
kh_float64_t,
kh_int64_t,
kh_pymap_t,
kh_str_t,
kh_uint64_t,
uint64_t,
)
# prototypes for sharing
cdef class HashTable:
pass
cdef class UInt64HashTable(HashTable):
cdef kh_uint64_t *table
cpdef get_item(self, uint64_t val)
cpdef set_item(self, uint64_t key, Py_ssize_t val)
cdef class Int64HashTable(HashTable):
cdef kh_int64_t *table
cpdef get_item(self, int64_t val)
cpdef set_item(self, int64_t key, Py_ssize_t val)
cdef class Float64HashTable(HashTable):
cdef kh_float64_t *table
cpdef get_item(self, float64_t val)
cpdef set_item(self, float64_t key, Py_ssize_t val)
cdef class PyObjectHashTable(HashTable):
cdef kh_pymap_t *table
cpdef get_item(self, object val)
cpdef set_item(self, object key, Py_ssize_t val)
cdef class StringHashTable(HashTable):
cdef kh_str_t *table
cpdef get_item(self, str val)
cpdef set_item(self, str key, Py_ssize_t val)
cdef struct Int64VectorData:
int64_t *data
Py_ssize_t n, m
cdef class Int64Vector:
cdef Int64VectorData *data
cdef ndarray ao
cdef bint external_view_exists
cdef resize(self)
cpdef to_array(self)
cdef inline void append(self, int64_t x)
cdef extend(self, int64_t[:] x)