Commit 6f31e429 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Change default edge/node label type in subgraph_isomorphism()

Use int64_t instead of int32_t as the default label type.
parent 24a16870
Pipeline #77 passed with stage
......@@ -191,17 +191,17 @@ subgraph_isomorphism(GraphInterface& gi1, GraphInterface& gi2,
// ConstantPropertyMap<bool,GraphInterface::edge_t> >
// ::type edge_props_t;
typedef property_map_type::apply<int32_t,
typedef property_map_type::apply<int64_t,
GraphInterface::vertex_index_map_t>::type vlabel_t;
typedef mpl::vector<typename vlabel_t::unchecked_t,
ConstantPropertyMap<bool,
GraphInterface::vertex_t> > vertex_props_t;
typedef mpl::vector2<typename vlabel_t::unchecked_t,
ConstantPropertyMap<bool,
GraphInterface::vertex_t> > vertex_props_t;
typedef property_map_type::apply<int32_t,
typedef property_map_type::apply<int64_t,
GraphInterface::edge_index_map_t>::type elabel_t;
typedef mpl::vector<typename elabel_t::unchecked_t,
ConstantPropertyMap<bool,
GraphInterface::edge_t> > edge_props_t;
typedef mpl::vector2<typename elabel_t::unchecked_t,
ConstantPropertyMap<bool,
GraphInterface::edge_t> > edge_props_t;
if (gi1.get_directed() != gi2.get_directed())
......
......@@ -351,15 +351,15 @@ def subgraph_isomorphism(sub, g, max_n=0, vertex_label=None, edge_label=None,
vertex_label = (None, None)
elif vertex_label[0].value_type() != vertex_label[1].value_type():
raise ValueError("Both vertex label property maps must be of the same type!")
elif vertex_label[0].value_type() != "int32_t":
vertex_label = perfect_prop_hash(vertex_label, htype="int32_t")
elif vertex_label[0].value_type() != "int64_t":
vertex_label = perfect_prop_hash(vertex_label, htype="int64_t")
if edge_label is None:
edge_label = (None, None)
elif edge_label[0].value_type() != edge_label[1].value_type():
raise ValueError("Both edge label property maps must be of the same type!")
elif edge_label[0].value_type() != "int32_t":
edge_label = perfect_prop_hash(edge_label, htype="int32_t")
elif edge_label[0].value_type() != "int64_t":
edge_label = perfect_prop_hash(edge_label, htype="int64_t")
vmaps = libgraph_tool_topology.\
subgraph_isomorphism(sub._Graph__graph, g._Graph__graph,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment