Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def separating_set(self, xi, xj, data=None, variable_types=None):
if not self.separating_sets and data and variable_types:
if not self._g:
self._build_g(variable_types)
self._find_skeleton(data, variable_types)
elif not self.separating_sets and not (data and variable_types):
raise SearchException("Can't measure separating sets: Need data and var types.")
if (xi,xj) in self.separating_sets:
return self.separating_sets[(xi,xj)]
elif (xj,xi) in self.separating_sets:
return self.separating_sets[(xj,xi)]
else:
return False