Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_attr_graph_used is not setting node_attr_key #36

Open
ljmartin opened this issue Aug 9, 2023 · 0 comments
Open

set_attr_graph_used is not setting node_attr_key #36

ljmartin opened this issue Aug 9, 2023 · 0 comments

Comments

@ljmartin
Copy link

ljmartin commented Aug 9, 2023

Thanks for a great library.

I'd like to calculate GED using node properties aka attributes. Like another issue, this doesn't seem to work in practice: #26

A starting point might be that the set_attr_graph_used doesn't appear to do anything. I'm afraid I don't know how to fix this, since the function does apparently change the attribute: https://github.com/Jacobe2169/GMatch4py/blob/4fc0a822514c65c0d8b12d090b5b89c0af50ef2a/gmatch4py/base.pyx#L68

ged=gm.GraphEditDistance(1,1,1,1) # all edit costs are equal to 1
ged.set_attr_graph_used("atomicNum",'hi')
ged.node_attr_key

output:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/var/folders/jh/02165y2n7kq2y5ychxtzcjm40000gn/T/ipykernel_37896/2867113632.py in <module>
      1 ged=gm.GraphEditDistance(1,1,1,1) # all edit costs are equal to 1
      2 ged.set_attr_graph_used("atomicNum",'hi')
----> 3 ged.node_attr_key

AttributeError: 'gmatch4py.ged.graph_edit_dist.GraphEditDistance' object has no attribute 'node_attr_key'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant