Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
6f31e429
Commit
6f31e429
authored
Nov 14, 2015
by
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
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/graph/topology/graph_subgraph_isomorphism.cc
View file @
6f31e429
...
...
@@ -191,17 +191,17 @@ subgraph_isomorphism(GraphInterface& gi1, GraphInterface& gi2,
// ConstantPropertyMap<bool,GraphInterface::edge_t> >
// ::type edge_props_t;
typedef
property_map_type
::
apply
<
int
32
_t
,
typedef
property_map_type
::
apply
<
int
64
_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
::
vector
2
<
typename
vlabel_t
::
unchecked_t
,
ConstantPropertyMap
<
bool
,
GraphInterface
::
vertex_t
>
>
vertex_props_t
;
typedef
property_map_type
::
apply
<
int
32
_t
,
typedef
property_map_type
::
apply
<
int
64
_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
::
vector
2
<
typename
elabel_t
::
unchecked_t
,
ConstantPropertyMap
<
bool
,
GraphInterface
::
edge_t
>
>
edge_props_t
;
if
(
gi1
.
get_directed
()
!=
gi2
.
get_directed
())
...
...
src/graph_tool/topology/__init__.py
View file @
6f31e429
...
...
@@ -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
()
!=
"int
32
_t"
:
vertex_label
=
perfect_prop_hash
(
vertex_label
,
htype
=
"int
32
_t"
)
elif
vertex_label
[
0
].
value_type
()
!=
"int
64
_t"
:
vertex_label
=
perfect_prop_hash
(
vertex_label
,
htype
=
"int
64
_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
()
!=
"int
32
_t"
:
edge_label
=
perfect_prop_hash
(
edge_label
,
htype
=
"int
32
_t"
)
elif
edge_label
[
0
].
value_type
()
!=
"int
64
_t"
:
edge_label
=
perfect_prop_hash
(
edge_label
,
htype
=
"int
64
_t"
)
vmaps
=
libgraph_tool_topology
.
\
subgraph_isomorphism
(
sub
.
_Graph__graph
,
g
.
_Graph__graph
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment