Commit 28e20607 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Speed up unpicking of PropertyMaps

parent c998861d
...@@ -852,13 +852,9 @@ class PropertyMap(object): ...@@ -852,13 +852,9 @@ class PropertyMap(object):
else: else:
u = GraphView(g, skip_vfilt=True, skip_efilt=True) u = GraphView(g, skip_vfilt=True, skip_efilt=True)
if key_type == "v": if key_type == "v":
pmap = g.new_vertex_property(value_type) pmap = g.new_vertex_property(value_type, vals=vals)
for i, v in enumerate(u.vertices()):
pmap[v] = vals[i]
elif key_type == "e": elif key_type == "e":
pmap = g.new_edge_property(value_type) pmap = g.new_edge_property(value_type, vals=vals)
for i, e in enumerate(u.edges()):
pmap[e] = vals[i]
else: else:
pmap = g.new_graph_property(value_type) pmap = g.new_graph_property(value_type)
pmap[g] = vals pmap[g] = vals
......
Supports Markdown
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