-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrsdec.pxd
69 lines (46 loc) · 2.49 KB
/
rsdec.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
63
64
65
66
67
68
69
from libcpp cimport *
from libc.stdio cimport *
from libc.stdint cimport uintptr_t, uint32_t
#include <Python/Python.h>
cdef extern from "lib/raresim/src/lists.h":
cdef packed struct uint32_t_array:
uint32_t num, size, *data
cdef struct uint32_t_array_init:
uint32_t init_size
#uint32_t_array *uint32_t_array_init(uint32_t init_size)
void uint32_t_array_destroy( uint32_t_array **ua)
uint32_t uint32_t_array_add(uint32_t_array *ua, uint32_t val)
uint32_t uint32_t_array_set(uint32_t_array *ua,uint32_t val, uint32_t index)
uintptr_t uint32_t_array_get(uint32_t_array *ua, uint32_t index)
uint32_t uint32_t_array_write(uint32_t_array *ua, char *file_name)
uint32_t_array *uint32_t_array_read(char *file_name)
#// UINT32 SPARSE MATRIX |||
cdef struct uint32_t_sparse_matrix:
uint32_t rows, size
uint32_t_array **data
uint32_t_sparse_matrix *uint32_t_sparse_matrix_init(uint32_t rows,
uint32_t cols)
void uint32_t_sparse_matrix_destroy(uint32_t_sparse_matrix **m)
uint32_t uint32_t_sparse_matrix_add(uint32_t_sparse_matrix *m,
uint32_t row,
uint32_t val)
uintptr_t uint32_t_sparse_martix_get(uint32_t_sparse_matrix *m,
uint32_t row,
uint32_t col)
uint32_t sparse_martix_get(uint32_t_sparse_matrix *m,
uint32_t row,
uint32_t col)
uint32_t_sparse_matrix *uint32_t_sparse_matrix_read(char *file_name)
void uint32_t_sparse_martix_remove_row(uint32_t_sparse_matrix *m,
uint32_t row)
uint32_t uint32_t_sparse_martix_num_rows(uint32_t_sparse_matrix *m)
uint32_t uint32_t_sparse_martix_num_cols(uint32_t_sparse_matrix *m)
uint32_t uint32_t_sparse_martix_not_Null(uint32_t_sparse_matrix *m,
uint32_t row)
uint32_t uint32_t_sparse_martix_row_num(uint32_t_sparse_matrix *m,
uint32_t row)
uint32_t uint32_t_sparse_martix_prune_row(uint32_t_sparse_matrix *m,
uint32_t row,
uint32_t num_prune)
uint32_t_sparse_matrix *read_matrix(char *file_name)
void write_matrix(uint32_t_sparse_matrix *m, char *file_name)