Passed
Push — master ( 193da7...4bb259 )
by Simon
01:36 queued 11s
created

hyperactive.search_process.search_process_longMem   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 52
Duplicated Lines 73.08 %

Importance

Changes 0
Metric Value
eloc 41
dl 38
loc 52
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A SearchProcessLongMem.__init__() 38 38 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
# Author: Simon Blanke
2
# Email: [email protected]
3
# License: MIT License
4
5
6
import numpy as np
7
import pandas as pd
8
9
from ..candidate import CandidateShortMem
10
from .search_process_shortMem import SearchProcessShortMem
11
12
13
class SearchProcessLongMem(SearchProcessShortMem):
14 View Code Duplication
    def __init__(
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
15
        self,
16
        nth_process,
17
        verb,
18
        objective_function,
19
        search_space,
20
        n_iter,
21
        function_parameter,
22
        optimizer,
23
        n_jobs,
24
        init_para,
25
        memory,
26
        hyperactive,
27
        random_state,
28
    ):
29
        super().__init__(
30
            nth_process,
31
            verb,
32
            objective_function,
33
            search_space,
34
            n_iter,
35
            function_parameter,
36
            optimizer,
37
            n_jobs,
38
            init_para,
39
            memory,
40
            hyperactive,
41
            random_state,
42
        )
43
44
        self.cand = CandidateShortMem(
45
            self.objective_function,
46
            self.function_parameter,
47
            self.search_space,
48
            self.init_para,
49
            self.memory,
50
            verb,
51
            hyperactive,
52
        )
53
54