MCPcopy Create free account
hub / github.com/PatWie/CppNumericalSolvers / FunctionState

Method FunctionState

include/cppoptlib/function_base.h:315–315  ·  view source on GitHub ↗

Legacy x-only constructor. Leaves value = 0 and gradient = empty; the caller must populate them before the state is consumed by the new eval-free code paths. Kept so existing user code that writes `FunctionState(x0)` continues to compile; the outer solver `Minimize` will evaluate `function(x)` once and rebuild a fully-populated state.

Source from the content-addressed store, hash-verified

313 // `FunctionState(x0)` continues to compile; the outer solver `Minimize`
314 // will evaluate `function(x)` once and rebuild a fully-populated state.
315 explicit FunctionState(VectorType x_in) : x(std::move(x_in)) {}
316
317 // Evaluate `function` at `x` once and populate all fields.
318 template <class FunctionT>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected