Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gmatch4py/ged/greedy_edit_distance.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cdef class GreedyEditDistance(GraphEditDistance):

cdef list edit_costs(self, G, H):
cdef np.ndarray cost_matrix=self.create_cost_matrix(G,H)
cdef np.ndarray cost_matrix_2=cost_matrix.copy().astype(np.double)
cdef np.ndarray cost_matrix_2=cost_matrix.copy().astype(np.float64)
cdef list psi=[]
for i in range(len(cost_matrix)):
phi_i=np.argmin(cost_matrix_2[i])
Expand Down
10 changes: 4 additions & 6 deletions gmatch4py/graph.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ cdef class Graph:
self.nodes_degree_in=np.array(degree_in)
self.nodes_degree_out=np.array(degree_out)

self.nodes_degree_weighted=np.array(degree_all_weighted).astype(np.double)
self.nodes_degree_in_weighted=np.array(degree_in_weighted).astype(np.double)
self.nodes_degree_out_weighted=np.array(degree_out_weighted).astype(np.double)
self.nodes_degree_weighted=np.array(degree_all_weighted).astype(np.float64)
self.nodes_degree_in_weighted=np.array(degree_in_weighted).astype(np.float64)
self.nodes_degree_out_weighted=np.array(degree_out_weighted).astype(np.float64)


# EDGE INFO INIT
Expand Down Expand Up @@ -371,7 +371,7 @@ cdef class Graph:

def __init_empty__(self):
self.nodes_list,self.nodes_attr_list,self.nodes_hash,self.nodes_weight,self.attr_nodes=[],[],[],[],[]
self.nodes_degree,self.nodes_degree_in,self.nodes_degree_out,self.nodes_degree_weighted,self.nodes_degree_in_weighted,self.nodes_degree_out_weighted=np.array([],dtype=np.long),np.array([],dtype=np.long),np.array([],dtype=np.long),np.array([],dtype=np.double),np.array([],dtype=np.double),np.array([],dtype=np.double)
self.nodes_degree,self.nodes_degree_in,self.nodes_degree_out,self.nodes_degree_weighted,self.nodes_degree_in_weighted,self.nodes_degree_out_weighted=np.array([],dtype=np.int64),np.array([],dtype=np.int64),np.array([],dtype=np.int64),np.array([],dtype=np.float64),np.array([],dtype=np.float64),np.array([],dtype=np.float64)
self.nodes_idx,self.degree_per_attr,self.degree_per_attr_weighted={},{},{}
self.nodes_hash_set=set([])
self.number_of_nodes = 0
Expand All @@ -385,5 +385,3 @@ cdef class Graph:
self.edges_weight={}
self.edges_hash_map={}
self.attr_edges=[]