You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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: