45 #ifndef ILQGAMES_COST_PROXIMITY_COST_H 46 #define ILQGAMES_COST_PROXIMITY_COST_H 48 #include <ilqgames/cost/time_invariant_cost.h> 49 #include <ilqgames/utils/types.h> 59 const std::pair<Dimension, Dimension>& position_idxs1,
60 const std::pair<Dimension, Dimension>& position_idxs2,
61 float threshold,
const std::string& name =
"")
63 threshold_(threshold),
64 threshold_sq_(threshold * threshold),
65 xidx1_(position_idxs1.first),
66 yidx1_(position_idxs1.second),
67 xidx2_(position_idxs2.first),
68 yidx2_(position_idxs2.second) {}
71 float Evaluate(
const VectorXf& input)
const;
75 void Quadraticize(
const VectorXf& input, MatrixXf* hess,
76 VectorXf* grad)
const;
80 const float threshold_, threshold_sq_;
83 const Dimension xidx1_, yidx1_;
84 const Dimension xidx2_, yidx2_;