Skip to content

Commit

Permalink
ok i may have figured it out...
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo-consoli committed Nov 22, 2023
1 parent 36f4a9d commit f992a38
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions code-experiments/build/python/src/cocoex/function.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ cdef extern from 'coco.h':
# add a declaration to the generated source files.
cdef extern coco_problem_t *coco_get_bbob_problem(size_t function, size_t
dimension, size_t instance)
cdef extern double coco_problem_get_best_value(coco_problem_t *p)


cdef class BenchmarkFunction:
"""A bare benchmark function from one of the available suites.
Expand Down Expand Up @@ -103,12 +102,7 @@ cdef class BenchmarkFunction:
def __del__(self):
if self._problem != NULL:
coco_problem_free(self._problem)


def best_value(self):
"""Return the best (lowest) possible function value"""
return coco_problem_get_best_value(self._problem)


def __str__(self):
return self.id

Expand Down

0 comments on commit f992a38

Please sign in to comment.