45 Eigen::VectorXd c = parameters.cwiseAbs2();
46 double xnorm = c.sum();
48 Eigen::VectorXd dEdc = 2.0 *
DiF_ +
DiFj_ * c +
DiFj_.transpose() * c;
49 Eigen::MatrixXd jac = Eigen::MatrixXd::Zero(c.size(), c.size());
50 for (
Index i = 0; i < jac.rows(); i++) {
51 for (
Index j = 0; j < jac.cols(); j++) {
52 jac(i, j) = -c(i) * 2.0 * parameters(j) / xnorm;
55 jac(i, i) += 2.0 * parameters(i) / xnorm;
57 return jac.transpose() * dEdc;