62 assert(block_jacobian.cols() ==
getVertexRaw(vtx_idx)->getDimensionUnfixed());
64 constexpr
const double delta = 1e-9;
65 constexpr
const double neg2delta = -2 * delta;
66 constexpr
const double scalar = 1.0 / (2 * delta);
78 vertex->
plus(i, delta);
81 vertex->
plus(i, neg2delta);
83 block_jacobian.col(col_idx) = scalar * (values2 - values1);
85 vertex->
plus(i, delta);
94 for (
int i = 0; i <
getDimension(); ++i) block_jacobian.row(i) *= multipliers[i];
104 assert(block_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
105 assert(block_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
114 double scalar = 1.0 / delta;
115 if (weight != 1.0) scalar *= weight;
120 Eigen::MatrixXd jacobian1(
getDimension(), vertex_i->getDimensionUnfixed());
121 Eigen::MatrixXd jacobian2(
getDimension(), vertex_i->getDimensionUnfixed());
126 for (
int j = 0; j < vertex_j->getDimension(); ++j)
128 if (vertex_j->isFixedComponent(j))
continue;
130 vertex_j->plus(j, delta);
136 for (
int val_idx = 0; val_idx <
getDimension(); ++val_idx)
137 block_hessian_ij.col(param_idx_j) += scalar * multipliers[val_idx] * (jacobian2.row(val_idx) - jacobian1.row(val_idx)).transpose();
141 for (
int val_idx = 0; val_idx <
getDimension(); ++val_idx)
142 block_hessian_ij.col(param_idx_j) += scalar * (jacobian2.row(val_idx) - jacobian1.row(val_idx)).transpose();
144 vertex_j->plus(j, -delta);
159 assert(block_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
160 assert(block_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
161 assert(block_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
170 double scalar = 1.0 / delta;
171 if (weight != 1.0) scalar *= weight;
183 vertex_j->
plus(j, delta);
189 for (
int val_idx = 0; val_idx <
getDimension(); ++val_idx)
190 block_hessian_ij.col(param_idx_j) +=
191 scalar * multipliers[val_idx] * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
195 for (
int val_idx = 0; val_idx <
getDimension(); ++val_idx)
196 block_hessian_ij.col(param_idx_j) += scalar * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
198 vertex_j->
plus(j, -delta);
213 assert(block_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
214 assert(block_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
215 assert(block_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
224 double scalar = 1.0 / delta;
225 if (weight != 1.0) scalar *= weight;
237 vertex_j->
plus(j, delta);
243 block_hessian_ij.col(param_idx_j) = scalar * multipliers[0] * (jacobian2.row(0) - block_jacobian_i.row(0)).transpose();
244 for (
int val_idx = 1; val_idx <
getDimension(); ++val_idx)
245 block_hessian_ij.col(param_idx_j) +=
246 scalar * multipliers[val_idx] * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
250 block_hessian_ij.col(param_idx_j) = scalar * (jacobian2.row(0) - block_jacobian_i.row(0)).transpose();
251 for (
int val_idx = 1; val_idx <
getDimension(); ++val_idx)
252 block_hessian_ij.col(param_idx_j) += scalar * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
254 vertex_j->
plus(j, -delta);
268 assert(block_jacobian.cols() ==
getVertexRaw(vtx_idx)->getDimensionUnfixed());
270 constexpr
const double delta = 1e-9;
271 constexpr
const double neg2delta = -2 * delta;
272 constexpr
const double scalar = 1.0 / (2 * delta);
280 for (
int i = 0; i < vertex->getDimension(); ++i)
282 if (vertex->isFixedComponent(i))
continue;
284 vertex->plus(i, delta);
288 vertex->plus(i, neg2delta);
291 block_jacobian.col(col_idx) = scalar * (values2 - values1);
293 vertex->plus(i, delta);
312 assert(block_jacobian.cols() ==
getVertexRaw(vtx_idx)->getDimensionUnfixed());
314 constexpr
const double delta = 1e-9;
315 constexpr
const double neg2delta = -2 * delta;
316 constexpr
const double scalar = 1.0 / (2 * delta);
324 for (
int i = 0; i < vertex->getDimension(); ++i)
326 if (vertex->isFixedComponent(i))
continue;
328 vertex->plus(i, delta);
332 vertex->plus(i, neg2delta);
335 block_jacobian.col(col_idx) = scalar * (values2 - values1);
337 vertex->plus(i, delta);
356 assert(block_jacobian.cols() ==
getVertexRaw(vtx_idx)->getDimensionUnfixed());
358 constexpr
const double delta = 1e-9;
359 constexpr
const double neg2delta = -2 * delta;
360 constexpr
const double scalar = 1.0 / (2 * delta);
368 for (
int i = 0; i < vertex->getDimension(); ++i)
370 if (vertex->isFixedComponent(i))
continue;
372 vertex->plus(i, delta);
376 vertex->plus(i, neg2delta);
379 block_jacobian.col(col_idx) = scalar * (values2 - values1);
381 vertex->plus(i, delta);
396 const double* ineq_multipliers)
405 assert(obj_jacobian.rows() == obj_dim);
406 assert(obj_jacobian.cols() ==
getVertexRaw(vtx_idx)->getDimensionUnfixed());
407 assert(eq_jacobian.rows() == eq_dim);
408 assert(eq_jacobian.cols() ==
getVertexRaw(vtx_idx)->getDimensionUnfixed());
409 assert(ineq_jacobian.rows() == ineq_dim);
410 assert(ineq_jacobian.cols() ==
getVertexRaw(vtx_idx)->getDimensionUnfixed());
412 constexpr
const double delta = 1e-9;
413 constexpr
const double neg2delta = -2 * delta;
414 constexpr
const double scalar = 1.0 / (2 * delta);
418 Eigen::VectorXd obj_values1(obj_dim);
419 Eigen::VectorXd obj_values2(obj_dim);
420 Eigen::VectorXd eq_values1(eq_dim);
421 Eigen::VectorXd eq_values2(eq_dim);
422 Eigen::VectorXd ineq_values1(ineq_dim);
423 Eigen::VectorXd ineq_values2(ineq_dim);
430 vertex->
plus(i, delta);
436 vertex->
plus(i, neg2delta);
442 if (obj_dim > 0) obj_jacobian.col(col_idx) = scalar * (obj_values2 - obj_values1);
443 if (eq_dim > 0) eq_jacobian.col(col_idx) = scalar * (eq_values2 - eq_values1);
444 if (ineq_dim > 0) ineq_jacobian.col(col_idx) = scalar * (ineq_values2 - ineq_values1);
446 vertex->
plus(i, delta);
452 if (obj_multipliers && obj_dim > 0)
454 for (
int i = 0; i < obj_dim; ++i) obj_jacobian.row(i) *= obj_multipliers[i];
456 if (eq_multipliers && eq_dim > 0)
458 for (
int i = 0; i < eq_dim; ++i) eq_jacobian.row(i) *= eq_multipliers[i];
460 if (ineq_multipliers && ineq_dim > 0)
462 for (
int i = 0; i < ineq_dim; ++i) ineq_jacobian.row(i) *= ineq_multipliers[i];
467 const double* eq_multipliers,
const double* ineq_multipliers)
475 assert(eq_jacobian.rows() == eq_dim);
476 assert(eq_jacobian.cols() ==
getVertexRaw(vtx_idx)->getDimensionUnfixed());
477 assert(ineq_jacobian.rows() == ineq_dim);
478 assert(ineq_jacobian.cols() ==
getVertexRaw(vtx_idx)->getDimensionUnfixed());
480 constexpr
const double delta = 1e-9;
481 constexpr
const double neg2delta = -2 * delta;
482 constexpr
const double scalar = 1.0 / (2 * delta);
486 Eigen::VectorXd eq_values1(eq_dim);
487 Eigen::VectorXd eq_values2(eq_dim);
488 Eigen::VectorXd ineq_values1(ineq_dim);
489 Eigen::VectorXd ineq_values2(ineq_dim);
492 for (
int i = 0; i < vertex->getDimension(); ++i)
494 if (vertex->isFixedComponent(i))
continue;
496 vertex->plus(i, delta);
501 vertex->plus(i, neg2delta);
506 if (eq_dim > 0) eq_jacobian.col(col_idx) = scalar * (eq_values2 - eq_values1);
507 if (ineq_dim > 0) ineq_jacobian.col(col_idx) = scalar * (ineq_values2 - ineq_values1);
509 vertex->plus(i, delta);
515 if (eq_multipliers && eq_dim > 0)
517 for (
int i = 0; i < eq_dim; ++i) eq_jacobian.row(i) *= eq_multipliers[i];
519 if (ineq_multipliers && ineq_dim > 0)
521 for (
int i = 0; i < ineq_dim; ++i) ineq_jacobian.row(i) *= ineq_multipliers[i];
533 assert(block_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
534 assert(block_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
535 assert(block_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
544 double scalar = 1.0 / delta;
545 if (weight != 1.0) scalar *= weight;
557 vertex_j->
plus(j, delta);
563 block_hessian_ij.col(param_idx_j) = scalar * multipliers[0] * (jacobian2.row(0) - block_jacobian_i.row(0)).transpose();
565 block_hessian_ij.col(param_idx_j) +=
566 scalar * multipliers[val_idx] * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
570 block_hessian_ij.col(param_idx_j) = scalar * (jacobian2.row(0) - block_jacobian_i.row(0)).transpose();
572 block_hessian_ij.col(param_idx_j) += scalar * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
574 vertex_j->
plus(j, -delta);
588 assert(block_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
589 assert(block_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
590 assert(block_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
599 double scalar = 1.0 / delta;
600 if (weight != 1.0) scalar *= weight;
612 vertex_j->
plus(j, delta);
618 block_hessian_ij.col(param_idx_j) = scalar * multipliers[0] * (jacobian2.row(0) - block_jacobian_i.row(0)).transpose();
620 block_hessian_ij.col(param_idx_j) +=
621 scalar * multipliers[val_idx] * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
625 block_hessian_ij.col(param_idx_j) = scalar * (jacobian2.row(0) - block_jacobian_i.row(0)).transpose();
627 block_hessian_ij.col(param_idx_j) += scalar * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
629 vertex_j->
plus(j, -delta);
643 assert(block_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
644 assert(block_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
645 assert(block_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
654 double scalar = 1.0 / delta;
655 if (weight != 1.0) scalar *= weight;
667 vertex_j->
plus(j, delta);
673 block_hessian_ij.col(param_idx_j) = scalar * multipliers[0] * (jacobian2.row(0) - block_jacobian_i.row(0)).transpose();
675 block_hessian_ij.col(param_idx_j) +=
676 scalar * multipliers[val_idx] * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
680 block_hessian_ij.col(param_idx_j) = scalar * (jacobian2.row(0) - block_jacobian_i.row(0)).transpose();
682 block_hessian_ij.col(param_idx_j) += scalar * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
684 vertex_j->
plus(j, -delta);
701 assert(obj_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
703 assert(eq_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
705 assert(ineq_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
706 assert(obj_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
707 assert(obj_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
708 assert(eq_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
709 assert(eq_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
710 assert(ineq_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
711 assert(ineq_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
717 constexpr
const double scalar = 1.0 / delta;
731 vertex_j->
plus(j, delta);
733 computeJacobians(vtx_idx_i, obj_jacobian_j, eq_jacobian_j, ineq_jacobian_j);
737 obj_hessian_ij.col(param_idx_j) = weight_obj * scalar * (obj_jacobian_j.row(0) - obj_jacobian_i.row(0)).transpose();
739 obj_hessian_ij.col(param_idx_j) += weight_obj * scalar * (obj_jacobian_j.row(val_idx) - obj_jacobian_i.row(val_idx)).transpose();
745 eq_hessian_ij.col(param_idx_j) = scalar * multipliers_eq[0] * (eq_jacobian_j.row(0) - eq_jacobian_i.row(0)).transpose();
747 eq_hessian_ij.col(param_idx_j) +=
748 scalar * multipliers_eq[val_idx] * (eq_jacobian_j.row(val_idx) - eq_jacobian_i.row(val_idx)).transpose();
752 eq_hessian_ij.col(param_idx_j) = scalar * (eq_jacobian_j.row(0) - eq_jacobian_i.row(0)).transpose();
754 eq_hessian_ij.col(param_idx_j) += scalar * (eq_jacobian_j.row(val_idx) - eq_jacobian_i.row(val_idx)).transpose();
759 if (multipliers_ineq)
761 ineq_hessian_ij.col(param_idx_j) = scalar * multipliers_ineq[0] * (ineq_jacobian_j.row(0) - ineq_jacobian_i.row(0)).transpose();
763 ineq_hessian_ij.col(param_idx_j) +=
764 scalar * multipliers_ineq[val_idx] * (ineq_jacobian_j.row(val_idx) - ineq_jacobian_i.row(val_idx)).transpose();
768 ineq_hessian_ij.col(param_idx_j) = scalar * (ineq_jacobian_j.row(0) - ineq_jacobian_i.row(0)).transpose();
770 ineq_hessian_ij.col(param_idx_j) += scalar * (ineq_jacobian_j.row(val_idx) - ineq_jacobian_i.row(val_idx)).transpose();
774 vertex_j->
plus(j, -delta);
784 const double* multipliers_ineq)
791 assert(eq_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
793 assert(ineq_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
794 assert(eq_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
795 assert(eq_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
796 assert(ineq_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
797 assert(ineq_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
803 constexpr
const double scalar = 1.0 / delta;
816 vertex_j->
plus(j, delta);
824 eq_hessian_ij.col(param_idx_j) = scalar * multipliers_eq[0] * (eq_jacobian_j.row(0) - eq_jacobian_i.row(0)).transpose();
826 eq_hessian_ij.col(param_idx_j) +=
827 scalar * multipliers_eq[val_idx] * (eq_jacobian_j.row(val_idx) - eq_jacobian_i.row(val_idx)).transpose();
831 eq_hessian_ij.col(param_idx_j) = scalar * (eq_jacobian_j.row(0) - eq_jacobian_i.row(0)).transpose();
833 eq_hessian_ij.col(param_idx_j) += scalar * (eq_jacobian_j.row(val_idx) - eq_jacobian_i.row(val_idx)).transpose();
838 if (multipliers_ineq)
840 ineq_hessian_ij.col(param_idx_j) = scalar * multipliers_ineq[0] * (ineq_jacobian_j.row(0) - ineq_jacobian_i.row(0)).transpose();
842 ineq_hessian_ij.col(param_idx_j) +=
843 scalar * multipliers_ineq[val_idx] * (ineq_jacobian_j.row(val_idx) - ineq_jacobian_i.row(val_idx)).transpose();
847 ineq_hessian_ij.col(param_idx_j) = scalar * (ineq_jacobian_j.row(0) - ineq_jacobian_i.row(0)).transpose();
849 ineq_hessian_ij.col(param_idx_j) += scalar * (ineq_jacobian_j.row(val_idx) - ineq_jacobian_i.row(val_idx)).transpose();
853 vertex_j->
plus(j, -delta);
868 assert(block_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
869 assert(block_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
870 assert(block_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
879 double scalar = 1.0 / delta;
880 if (weight != 1.0) scalar *= weight;
892 vertex_j->
plus(j, delta);
899 block_hessian_ij.col(param_idx_j) +=
900 scalar * multipliers[val_idx] * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
905 block_hessian_ij.col(param_idx_j) += scalar * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
907 vertex_j->
plus(j, -delta);
921 assert(block_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
922 assert(block_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
923 assert(block_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
932 double scalar = 1.0 / delta;
933 if (weight != 1.0) scalar *= weight;
945 vertex_j->
plus(j, delta);
952 block_hessian_ij.col(param_idx_j) +=
953 scalar * multipliers[val_idx] * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
958 block_hessian_ij.col(param_idx_j) += scalar * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
960 vertex_j->
plus(j, -delta);
974 assert(block_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
975 assert(block_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
976 assert(block_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
985 double scalar = 1.0 / delta;
986 if (weight != 1.0) scalar *= weight;
998 vertex_j->
plus(j, delta);
1005 block_hessian_ij.col(param_idx_j) +=
1006 scalar * multipliers[val_idx] * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
1011 block_hessian_ij.col(param_idx_j) += scalar * (jacobian2.row(val_idx) - block_jacobian_i.row(val_idx)).transpose();
1013 vertex_j->
plus(j, -delta);
1023 const double* multipliers_eq,
const double* multipliers_ineq,
double weight_obj)
1030 assert(obj_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
1032 assert(eq_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
1034 assert(ineq_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
1035 assert(obj_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
1036 assert(obj_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
1037 assert(eq_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
1038 assert(eq_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
1039 assert(ineq_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
1040 assert(ineq_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
1046 constexpr
const double scalar = 1.0 / delta;
1055 int param_idx_j = 0;
1060 vertex_j->
plus(j, delta);
1062 computeJacobians(vtx_idx_i, obj_jacobian_j, eq_jacobian_j, ineq_jacobian_j);
1067 obj_hessian_ij.col(param_idx_j) += weight_obj * scalar * (obj_jacobian_j.row(val_idx) - obj_jacobian_i.row(val_idx)).transpose();
1074 eq_hessian_ij.col(param_idx_j) +=
1075 scalar * multipliers_eq[val_idx] * (eq_jacobian_j.row(val_idx) - eq_jacobian_i.row(val_idx)).transpose();
1080 eq_hessian_ij.col(param_idx_j) += scalar * (eq_jacobian_j.row(val_idx) - eq_jacobian_i.row(val_idx)).transpose();
1085 if (multipliers_ineq)
1088 ineq_hessian_ij.col(param_idx_j) +=
1089 scalar * multipliers_ineq[val_idx] * (ineq_jacobian_j.row(val_idx) - ineq_jacobian_i.row(val_idx)).transpose();
1094 ineq_hessian_ij.col(param_idx_j) += scalar * (ineq_jacobian_j.row(val_idx) - ineq_jacobian_i.row(val_idx)).transpose();
1098 vertex_j->
plus(j, -delta);
1108 const double* multipliers_ineq)
1115 assert(eq_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
1117 assert(ineq_jacobian_i.cols() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
1118 assert(eq_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
1119 assert(eq_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
1120 assert(ineq_hessian_ij.rows() ==
getVertexRaw(vtx_idx_i)->getDimensionUnfixed());
1121 assert(ineq_hessian_ij.cols() ==
getVertexRaw(vtx_idx_j)->getDimensionUnfixed());
1127 constexpr
const double scalar = 1.0 / delta;
1135 int param_idx_j = 0;
1140 vertex_j->
plus(j, delta);
1149 eq_hessian_ij.col(param_idx_j) +=
1150 scalar * multipliers_eq[val_idx] * (eq_jacobian_j.row(val_idx) - eq_jacobian_i.row(val_idx)).transpose();
1155 eq_hessian_ij.col(param_idx_j) += scalar * (eq_jacobian_j.row(val_idx) - eq_jacobian_i.row(val_idx)).transpose();
1160 if (multipliers_ineq)
1163 ineq_hessian_ij.col(param_idx_j) +=
1164 scalar * multipliers_ineq[val_idx] * (ineq_jacobian_j.row(val_idx) - ineq_jacobian_i.row(val_idx)).transpose();
1169 ineq_hessian_ij.col(param_idx_j) += scalar * (ineq_jacobian_j.row(val_idx) - ineq_jacobian_i.row(val_idx)).transpose();
1173 vertex_j->
plus(j, -delta);