# Path: retired/discrete/operators.py
# def is_discrete_effect(effect):
#   return isinstance(effect, ValueEffect)
# 
# Path: misc/generators.py
# class GeneratorWrapper(Iterator):
#   def __init__(self, generator):
#     self.generator = generator
#   def next(self):
#     return self.generator.next()
#   def __call__(self):
#     return self.next()


from .operators import is_discrete_effect
from misc.generators import GeneratorWrapper


# https://docs.python.org/2/library/functions.html#staticmethod

class Subplanner(object):
  def applicable(self, start_vertex, goal_connector, rg):
    raise NotImplementedError('Subplanner must implement applicable(self, start_vertex, goal_connector, rg)')
  def generator(self, start_vertex, goal_connector, rg):
    raise NotImplementedError('Subplanner must implement generator(self, start_vertex, goal_connector, rg)')
  def __contains__(self, start_vertex, goal_connector, rg):
    return self.applicable(start_vertex, goal_connector, rg)
  def __call__(self, start_vertex, goal_connector, rg):
    return SubplannerGenerator(start_vertex, goal_connector, rg, self.generator)


# Path: retired/discrete/operators.py
# def is_discrete_effect(effect):
#   return isinstance(effect, ValueEffect)
# 
# Path: misc/generators.py
# class GeneratorWrapper(Iterator):
#   def __init__(self, generator):
#     self.generator = generator
#   def next(self):
#     return self.generator.next()
#   def __call__(self):
#     return self.next()


# Path: retired/discrete/subplanners.py
from .operators import is_discrete_effect
from misc.generators import GeneratorWrapper



# https://docs.python.org/2/library/functions.html#staticmethod

class Subplanner(object):
  def applicable(self, start_vertex, goal_connector, rg):
    raise NotImplementedError('Subplanner must implement applicable(self, start_vertex, goal_connector, rg)')
  def generator(self, start_vertex, goal_connector, rg):
    raise NotImplementedError('Subplanner must implement generator(self, start_vertex, goal_connector, rg)')
  def __contains__(self, start_vertex, goal_connector, rg):
    return self.applicable(start_vertex, goal_connector, rg)
  def __call__(self, start_vertex, goal_connector, rg):
    return SubplannerGenerator(start_vertex, goal_connector, rg, self.generator)


class SubplannerGenerator(GeneratorWrapper):