44 #ifndef ILQGAMES_COST_LOCALLY_CONVEX_PROXIMITY_COST_H 45 #define ILQGAMES_COST_LOCALLY_CONVEX_PROXIMITY_COST_H 47 #include <ilqgames/cost/time_invariant_cost.h> 48 #include <ilqgames/utils/types.h> 57 float weight,
const std::pair<Dimension, Dimension>& position_idxs1,
58 const std::pair<Dimension, Dimension>& position_idxs2,
float threshold,
59 const std::string& name =
"")
61 threshold_(threshold),
62 threshold_sq_(threshold * threshold),
63 xidx1_(position_idxs1.first),
64 yidx1_(position_idxs1.second),
65 xidx2_(position_idxs2.first),
66 yidx2_(position_idxs2.second) {}
69 float Evaluate(
const VectorXf& input)
const;
73 void Quadraticize(
const VectorXf& input, MatrixXf* hess,
74 VectorXf* grad)
const;
78 const float threshold_, threshold_sq_;
81 const Dimension xidx1_, yidx1_;
82 const Dimension xidx2_, yidx2_;