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

Simple membership test: X in graph #10

Open
goodmami opened this issue Mar 28, 2017 · 0 comments · May be fixed by #118
Open

Simple membership test: X in graph #10

goodmami opened this issue Mar 28, 2017 · 0 comments · May be fixed by #118

Comments

@goodmami
Copy link
Owner

It would be useful to have a simple way to test if a graph has certain elements. This would be done my implementing the __contains__() method on the Graph class.

I can imagine several behaviors based on the type of thing being checked:

  • string ('xyz' in g) - return True if the string is an attribute (i.e. terminal) value
  • Graph (Graph(...) in g) - return True if the query graph is isomorphic to a subgraph of g
  • tuple (('x', 'polarity', '-') in g) - return True if the query tuple is a triple in g

To start, maybe we should just consider string values.

@goodmami goodmami added the easy label Mar 28, 2017
@goodmami goodmami removed the easy label Apr 30, 2020
@BramVanroy BramVanroy linked a pull request Aug 7, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant