Passed
Push — master ( 047469...b66fc0 )
by Simon
04:21 queued 12s
created

SearchStatistics.__init__()   A

Complexity

Conditions 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
# Author: Simon Blanke
2
# Email: [email protected]
3
# License: MIT License
4
5
6
class SearchStatistics:
7
    def __init__(self):
8
        super().__init__()
9
10
        self.nth_iter = 0
11
12
        self.n_init_total = 0
13
        self.n_iter_total = 0
14
15
    def init_stats(func):
16
        def wrapper(self, *args, **kwargs):
17
            self.n_init_search = 0
18
            self.n_iter_search = 0
19
20
            res = func(self, *args, **kwargs)
21
            return res
22
23
        return wrapper
24