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

how to get the vertices id from the original data #5

Closed
caijiangyao1991 opened this issue Jul 2, 2018 · 1 comment
Closed

how to get the vertices id from the original data #5

caijiangyao1991 opened this issue Jul 2, 2018 · 1 comment

Comments

@caijiangyao1991
Copy link

caijiangyao1991 commented Jul 2, 2018

hi, @betterenvi i have a question about how to get the vertices id from the original data after geting the frequent_subgraphs . you use projected to get where one frequent subgraph appears in database , so i think i can use the projected to get the vertices' formid and toid ,but i found it's wrong , its' result only get parts of the subgraphs not all subgraphs of the origin graph? i can't find how to get the original vertices id, hope you can help thx!

   if self._where:
        print('where: {}'.format(list(set([p.gid for p in projected]))))
        for p in projected:
            print("p:"+str(p.gid))
            print(p.edge.frm,p.edge.to,p.edge.elb)

t # 12
v 0
v 1 3
v 2 4
e 0 1 3
e 1 2 2
Support: 2
where: [0, 3]
p:0
3 5 2
p:0
9 5 2
p:3
3 5 2

@betterenvi
Copy link
Owner

For each p in projected, p is a linked list. You can use p.prev iteratively to obtain the whole sub graph.

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

2 participants