MCPcopy Create free account
hub / github.com/anyoptimization/pymoo / do

Method do

pymoo/core/problem.py:208–222  ·  view source on GitHub ↗
(self, X, return_values_of, *args, **kwargs)

Source from the content-addressed store, hash-verified

206 return tuple([out[e] for e in return_values_of])
207
208 def do(self, X, return_values_of, *args, **kwargs):
209
210 # create an empty dictionary
211 out = {name: None for name in return_values_of}
212
213 # do the function evaluation
214 if self.elementwise:
215 self._evaluate_elementwise(X, out, *args, **kwargs)
216 else:
217 self._evaluate_vectorized(X, out, *args, **kwargs)
218
219 # finally format the output dictionary
220 out = self._format_dict(out, len(X), return_values_of)
221
222 return out
223
224 def _evaluate_vectorized(self, X, out, *args, **kwargs):
225 self._evaluate(X, out, *args, **kwargs)

Callers 1

evaluateMethod · 0.95

Calls 3

_evaluate_elementwiseMethod · 0.95
_evaluate_vectorizedMethod · 0.95
_format_dictMethod · 0.95

Tested by

no test coverage detected