Go to the documentation of this file.
30 #ifndef EXOTICA_CORE_TOOLS_SPARSE_COSTS_H_
31 #define EXOTICA_CORE_TOOLS_SPARSE_COSTS_H_
34 #include <Eigen/Dense>
41 if (std::abs(x) < beta)
44 return beta * (std::abs(x) - 0.5 * beta);
49 if (std::abs(x) < beta)
58 if (std::abs(x) < beta)
65 if (std::abs(x) < beta)
66 return 0.5 * x * x / beta;
67 return std::abs(x) - 0.5 * beta;
72 if (std::abs(x) < beta)
81 if (std::abs(x) < beta)
88 return beta * beta * (std::sqrt(1 + std::pow(x / beta, 2)) - 1.0);
93 return x / (std::sqrt(1.0 + x * x / (beta * beta)));
98 return std::pow(beta, 4) * std::sqrt(1.0 + x * x / (beta * beta)) / (std::pow(beta * beta + x * x, 2));
103 #endif // EXOTICA_CORE_TOOLS_SPARSE_COSTS_H_
double pseudo_huber_jacobian(double x, double beta)
Definition: sparse_costs.h:91
double smooth_l1_hessian(double x, double beta)
Definition: sparse_costs.h:79
double huber_jacobian(double x, double beta)
Definition: sparse_costs.h:47
double smooth_l1_cost(double x, double beta)
Definition: sparse_costs.h:63
Definition: cartpole_dynamics_solver.h:38
double smooth_l1_jacobian(double x, double beta)
Definition: sparse_costs.h:70
double huber_cost(double x, double beta)
Definition: sparse_costs.h:39
double pseudo_huber_hessian(double x, double beta)
Definition: sparse_costs.h:96
double pseudo_huber_cost(double x, double beta)
Definition: sparse_costs.h:86
double huber_hessian(double x, double beta)
Definition: sparse_costs.h:56