Skip to content

set_attr_graph_used is not setting node_attr_key #36

Description

@ljmartin

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions