Commit 6698f9c7 authored by Theo Steininger's avatar Theo Steininger
Browse files

Refactored import structure in probing classes.

Added probing.py in demos folder.
parent 2e5af433
Pipeline #10069 failed with stages
in 16 minutes and 26 seconds
......@@ -55,7 +55,7 @@ from spaces import *
from operators import *
#from probing import *
from probing import *
from sugar import *
......
# -*- coding: utf-8 -*-
from mixin_base import MixinBase
class DiagonalProberMixin(MixinBase):
def __init__(self):
class DiagonalProberMixin(object):
def __init__(self, *args, **kwargs):
self.reset()
super(DiagonalProberMixin, self).__init__()
super(DiagonalProberMixin, self).__init__(*args, **kwargs)
def reset(self):
self.__sum_of_probings = 0
......
# -*- coding: utf-8 -*-
class MixinBase(object):
def reset(self, *args, **kwargs):
pass
def finish_probe(self, *args, **kwargs):
pass
# -*- coding: utf-8 -*-
from mixin_base import MixinBase
class TraceProberMixin(MixinBase):
def __init__(self):
class TraceProberMixin(object):
def __init__(self, *args, **kwargs):
self.reset()
super(TraceProberMixin, self).__init__()
super(TraceProberMixin, self).__init__(*args, **kwargs)
def reset(self):
self.__sum_of_probings = 0
......
......@@ -34,8 +34,6 @@ class Prober(object):
self._random_type = self._parse_random_type(random_type)
self.compute_variance = bool(compute_variance)
super(Prober, self).__init__()
# ---Properties---
@property
......@@ -84,7 +82,7 @@ class Prober(object):
self.finish_probe(current_probe, pre_result)
def reset(self):
super(Prober, self).reset()
pass
def get_probe(self, index):
""" layer of abstraction for potential probe-caching """
......@@ -107,7 +105,7 @@ class Prober(object):
return callee(probe, **kwargs)
def finish_probe(self, probe, pre_result):
super(Prober, self).finish_probe(probe, pre_result)
pass
def __call__(self, callee):
return self.probing_run(callee)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment