# Path: opentuner/search/technique.py
# class SearchTechniqueBase(with_metaclass(abc.ABCMeta, object)):
# class SearchTechnique(SearchPlugin, SearchTechniqueBase):
# class PureRandom(SearchTechnique):
# class AsyncProceduralSearchTechnique(SearchTechnique):
# class SequentialSearchTechnique(AsyncProceduralSearchTechnique):
#     def __init__(self, name=None):
#     def is_ready(self):
#     def default_name(self):
#     def handle_requested_result(self, result):
#     def set_driver(self, driver):
#     def desired_result(self):
#     def __init__(self, *pargs, **kwargs):
#     def set_driver(self, driver):
#     def desired_result(self):
#     def desired_configuration(self):
#     def handle_requested_result(self, result):
#     def default_generated_name(self):
#     def use_default_generated_name(self):
#     def base_name(self):
#     def get_hyper_parameters(cls):
#     def generate_technique(cls, manipulator=None, *args, **kwargs):
#     def desired_configuration(self):
#     def __init__(self, *pargs, **kwargs):
#     def call_main_generator(self):
#     def desired_configuration(self):
#     def main_generator(self):
#     def is_ready(self):
#     def __init__(self, novelty_threshold=50, reset_threshold=500, *pargs, **kwargs):
#     def yield_nonblocking(self, cfg):
#     def call_main_generator(self):
# def register(t):
# def register_generator(cls, generator_weight=1.0, *args, **kwargs):
# def get_random_generator_technique(generators=None, manipulator=None):
# def weighted_choice(choices):
# def all_techniques():
# def get_enabled(args):
# def get_root(args):


from opentuner.search import technique
                        self.yield_nonblocking(down_cfg)
                        points.append(down_cfg)

                    if unit_value < 1.0:
                        # produce new config with param set step_size higher
                        up_cfg = manipulator.copy(center.data)
                        param.set_unit_value(up_cfg, min(1.0, unit_value + step_size))
                        up_cfg = driver.get_configuration(up_cfg)
                        self.yield_nonblocking(up_cfg)
                        points.append(up_cfg)

                else:  # ComplexParameter
                    for mutate_function in param.manipulators(center.data):
                        cfg = manipulator.copy(center.data)
                        mutate_function(cfg)
                        cfg = driver.get_configuration(cfg)
                        self.yield_nonblocking(cfg)
                        points.append(cfg)

            yield None  # wait for all results

            if objective.lt(driver.best_result.configuration, center):
                # a new global best switch to that
                center = driver.best_result.configuration
            else:
                # no better point, shrink the pattern
                step_size /= 2.0


# register our new technique in global list

# Path: opentuner/search/technique.py
# class SearchTechniqueBase(with_metaclass(abc.ABCMeta, object)):
# class SearchTechnique(SearchPlugin, SearchTechniqueBase):
# class PureRandom(SearchTechnique):
# class AsyncProceduralSearchTechnique(SearchTechnique):
# class SequentialSearchTechnique(AsyncProceduralSearchTechnique):
#     def __init__(self, name=None):
#     def is_ready(self):
#     def default_name(self):
#     def handle_requested_result(self, result):
#     def set_driver(self, driver):
#     def desired_result(self):
#     def __init__(self, *pargs, **kwargs):
#     def set_driver(self, driver):
#     def desired_result(self):
#     def desired_configuration(self):
#     def handle_requested_result(self, result):
#     def default_generated_name(self):
#     def use_default_generated_name(self):
#     def base_name(self):
#     def get_hyper_parameters(cls):
#     def generate_technique(cls, manipulator=None, *args, **kwargs):
#     def desired_configuration(self):
#     def __init__(self, *pargs, **kwargs):
#     def call_main_generator(self):
#     def desired_configuration(self):
#     def main_generator(self):
#     def is_ready(self):
#     def __init__(self, novelty_threshold=50, reset_threshold=500, *pargs, **kwargs):
#     def yield_nonblocking(self, cfg):
#     def call_main_generator(self):
# def register(t):
# def register_generator(cls, generator_weight=1.0, *args, **kwargs):
# def get_random_generator_technique(generators=None, manipulator=None):
# def weighted_choice(choices):
# def all_techniques():
# def get_enabled(args):
# def get_root(args):


# Path: opentuner/search/patternsearch.py
from opentuner.search import technique

                        self.yield_nonblocking(down_cfg)
                        points.append(down_cfg)

                    if unit_value < 1.0:
                        # produce new config with param set step_size higher
                        up_cfg = manipulator.copy(center.data)
                        param.set_unit_value(up_cfg, min(1.0, unit_value + step_size))
                        up_cfg = driver.get_configuration(up_cfg)
                        self.yield_nonblocking(up_cfg)
                        points.append(up_cfg)

                else:  # ComplexParameter
                    for mutate_function in param.manipulators(center.data):
                        cfg = manipulator.copy(center.data)
                        mutate_function(cfg)
                        cfg = driver.get_configuration(cfg)
                        self.yield_nonblocking(cfg)
                        points.append(cfg)

            yield None  # wait for all results

            if objective.lt(driver.best_result.configuration, center):
                # a new global best switch to that
                center = driver.best_result.configuration
            else:
                # no better point, shrink the pattern
                step_size /= 2.0


# register our new technique in global list

technique.register(PatternSearch())