2 #include "modeling.hpp"
3 #include "num_diff.hpp"
4 #include "sco_common.hpp"
23 using Eigen::VectorXd;
24 using Eigen::MatrixXd;
31 VectorXd getVec(
const vector<double>& x,
const VarVector& vars);
35 DblVec getDblVec(
const vector<double>& x,
const VarVector& vars);
37 AffExpr affFromValGrad(
double y,
const VectorXd& x,
const VectorXd& dydx,
const VarVector& vars);
42 CostFromFunc(ScalarOfVectorPtr f,
const VarVector& vars,
const string& name,
bool full_hessian=
false);
43 double value(
const vector<double>& x);
44 ConvexObjectivePtr
convex(
const vector<double>& x,
Model* model);
55 CostFromErrFunc(VectorOfVectorPtr f,
const VarVector& vars,
const VectorXd& coeffs, PenaltyType pen_type,
const string& name);
57 CostFromErrFunc(VectorOfVectorPtr f, MatrixOfVectorPtr dfdx,
const VarVector& vars,
const VectorXd& coeffs, PenaltyType pen_type,
const string& name);
58 double value(
const vector<double>& x);
59 ConvexObjectivePtr
convex(
const vector<double>& x,
Model* model);
62 MatrixOfVectorPtr dfdx_;
65 PenaltyType pen_type_;
72 ConstraintFromFunc(VectorOfVectorPtr f,
const VarVector& vars,
const VectorXd& coeffs, ConstraintType
type,
const std::string& name);
74 ConstraintFromFunc(VectorOfVectorPtr f, MatrixOfVectorPtr dfdx,
const VarVector& vars,
const VectorXd& coeffs, ConstraintType type,
const std::string& name);
75 vector<double>
value(
const vector<double>& x);
76 ConvexConstraintsPtr
convex(
const vector<double>& x,
Model* model);
77 ConstraintType
type() {
return type_;}
80 MatrixOfVectorPtr dfdx_;