-
Notifications
You must be signed in to change notification settings - Fork 27
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
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 theGraph
class.I can imagine several behaviors based on the type of thing being checked:
'xyz' in g
) - return True if the string is an attribute (i.e. terminal) valueGraph(...) in g
) - return True if the query graph is isomorphic to a subgraph of g('x', 'polarity', '-') in g
) - return True if the query tuple is a triple in gTo start, maybe we should just consider string values.
The text was updated successfully, but these errors were encountered: