added iteration test to graph_test.py
[pygr.git] / pygr / cdict.pxd
blob6c303cd6b5dfd66598ad3ad50f015432400867ce
1 cdef extern from "string.h":
2   ctypedef int size_t
4 cdef extern from "stdlib.h":
5   void free(void *)
6   void qsort(void *base, size_t nmemb, size_t size,
7              int (*compar)(void *,void *))
9 cdef extern from "cgraph.h":
10     ctypedef struct CDictEntry:
11         int k
12         int v
14     ctypedef struct CDict:
15         int n
16         CDictEntry *dict
18     CDict *cdict_alloc(int n)
19     int cdict_free(CDict *d)
20     int cdict_qsort_cmp(void *void_a,void *void_b)
21     CDictEntry *cdict_getitem(CDict *d,int k)
23     ctypedef struct CGraphEntry:
24         int k
25         CDict *v
27     ctypedef struct CGraph:
28         int n
29         CGraphEntry *dict
31     CGraph *cgraph_alloc(int n)
32     int cgraph_free(CGraph *d)
33     CGraphEntry *cgraph_getitem(CGraph *d,int k)
34     int *calloc_int(int n)
38 cdef class CIntDictionary:
39     cdef CDict *d
40 cdef class CDictionary:
41     cdef CDict *d
42     cdef object key_index
43 cdef class CDictionaryRef:
44     cdef CDict *d
45     cdef object key_index
46     cdef object graph
49 cdef class CGraphDict:
50     cdef CGraph *d
51     cdef public object key_index
53 cdef class CDictIterator:
54     cdef int i
55     cdef CDict *d
56     cdef object cd
57     cdef int yieldKeys
58     cdef int yieldValues
59     cdef object key_index
62 cdef class CGraphIterator:
63     cdef int i
64     cdef CGraphDict g
65     cdef int yieldKeys
66     cdef int yieldValues
68 cdef class IntTupleArray:
69     cdef int *data
70     cdef int n
71     cdef int dim
72     cdef int n_alloc
73     cdef int vector_len
74     cdef int *vector
75     cdef int skipIndex
76     cdef readonly int isDone