gradient_free_optimizers._objective_functions._base_function   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A BaseFunction.objective_function() 0 2 1
A BaseFunction.search_space() 0 2 1
1
class BaseFunction:
2
    """
3
    Abstract base class for defining optimization functions.
4
5
    Methods
6
    -------
7
    objective_function(para)
8
        Should be implemented to evaluate the objective function for given parameters.
9
10
    search_space()
11
        Should be implemented to define the parameter search space.
12
    """
13
14
    def objective_function(self, para):
15
        raise NotImplementedError
16
17
    def search_space(self):
18
        raise NotImplementedError
19