13#ifndef OPTIMIST_VECTOR_FUNCTION_HH
14#define OPTIMIST_VECTOR_FUNCTION_HH
30 template <
typename Real, Integer N, Integer M,
typename DerivedFunction>
37 static_assert(N !=
static_cast<Integer>(0) && M !=
static_cast<Integer>(0),
38 "Are you sure you want to a zero-dimensional system of equations?");
39 static_assert(N !=
static_cast<Integer>(1) && M !=
static_cast<Integer>(1),
40 "C'mon, let's not kid ourselves. Use a scalar function...");
41 static_assert(M !=
static_cast<Integer>(1),
42 "Good try, but you're looking for an objective function, not a vector-valued function.");
61 std::string
name()
const {
return static_cast<const DerivedFunction *
>(
this)->name_impl();}
70 static_cast<const DerivedFunction *
>(
this)->evaluate_impl(x, out);
80 static_cast<const DerivedFunction *
>(
this)->first_derivative_impl(x, out);
90 static_cast<const DerivedFunction *
>(
this)->second_derivative_impl(x, out);
std::conditional_t< FunInDim==1 &&FunOutDim==1, Real, std::conditional_t< FunInDim==1||FunOutDim==1, Eigen::Matrix< Real, FunInDim, FunInDim >, std::vector< Eigen::Matrix< Real, FunInDim, FunInDim > > > > SecondDerivativeType
Definition Function.hh:47
typename std::conditional_t< FunInDim==1, Real, Eigen::Vector< Real, FunInDim > > InputType
Definition Function.hh:42
std::conditional_t< FunInDim==1 &&FunOutDim==1, Real, Eigen::Matrix< Real, FunOutDim, FunInDim > > FirstDerivativeType
Definition Function.hh:46
Function()
Definition Function.hh:59
typename std::conditional_t< FunOutDim==1, Real, Eigen::Vector< Real, FunOutDim > > OutputType
Definition Function.hh:43
typename Function< Real, N, M, DerivedFunction >::SecondDerivativeType Tensor
Definition VectorFunction.hh:50
VectorFunction()
Definition VectorFunction.hh:55
void jacobian(const InputVector &x, Matrix &out) const
Definition VectorFunction.hh:78
void evaluate(const InputVector &x, OutputVector &out) const
Definition VectorFunction.hh:68
typename Function< Real, N, M, DerivedFunction >::InputType InputVector
Definition VectorFunction.hh:45
typename Function< Real, N, M, DerivedFunction >::FirstDerivativeType Matrix
Definition VectorFunction.hh:49
typename Function< Real, N, M, DerivedFunction >::OutputType OutputVector
Definition VectorFunction.hh:46
std::string name() const
Definition VectorFunction.hh:61
void hessian(const InputVector &x, Tensor &out) const
Definition VectorFunction.hh:88
Namespace for the Optimist library.
Definition Optimist.hh:87
OPTIMIST_DEFAULT_INTEGER_TYPE Integer
The Integer type as used for the API.
Definition Optimist.hh:95