-
Notifications
You must be signed in to change notification settings - Fork 7
/
graph.pxd
28 lines (25 loc) · 897 Bytes
/
graph.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
'''
file:graph.pxd
'''
from libcpp.vector cimport vector
from libcpp.memory cimport shared_ptr
from libcpp.set cimport set
from libcpp.map cimport map
from libcpp.pair cimport pair
cdef extern from "./src/lib/graph.h":
cdef cppclass Graph:
Graph()except+
Graph(const int _num_nodes, const int _num_edges, const int* edges_from, const int* edges_to) except+
int num_nodes
int num_edges
vector[vector[int]] adj_list
vector[pair[int,int]] edge_list
cdef extern from "./src/lib/graph.h":
cdef cppclass GSet:
GSet()except+
void InsertGraph(int gid, shared_ptr[Graph] graph)except+
vector[shared_ptr[Graph]] Sample_Batch(int batch_size)
int GetSampleID()except+
shared_ptr[Graph] Get(int gid)except+
void Clear()except+
map[int, shared_ptr[Graph]] graph_pool