MCPcopy Create free account
hub / github.com/dartsim/dart / computeFunctions

Function computeFunctions

dart/optimizer/GenericMultiObjectiveProblem.cpp:221–238  ·  view source on GitHub ↗

==============================================================================

Source from the content-addressed store, hash-verified

219
220//==============================================================================
221static Eigen::VectorXd computeFunctions(
222 const std::vector<FunctionPtr>& functions,
223 std::size_t dimension,
224 const Eigen::VectorXd& x)
225{
226 Eigen::VectorXd val(dimension);
227
228 std::size_t index = 0u;
229 for (const FunctionPtr& function : functions) {
230 const std::size_t size = 1u; // TODO(JS): Update this once Function can
231 // return vector
232 // objectives.segment(index, size) = objective->evaluate(x);
233 val[static_cast<int>(index)] = function->eval(x);
234 index += size;
235 }
236
237 return val;
238}
239
240//==============================================================================
241Eigen::VectorXd GenericMultiObjectiveProblem::evaluateObjectives(

Callers 3

evaluateObjectivesMethod · 0.85
evaluateEqConstraintsMethod · 0.85

Calls 1

evalMethod · 0.45

Tested by

no test coverage detected