@@ -218,16 +218,61 @@ class Problem {
218
218
Jacobian GetJacobianOfCosts () const ;
219
219
220
220
/* *
221
- * @brief Extracts those entries from total hessian (combination of hessian from cost and constraints) that are not zero.
221
+ * @brief Computes the nonzero entries of the total Hessian after applying scaling factors.
222
+ *
223
+ * This function extracts the nonzero elements from the total Hessian, which is
224
+ * the combination of the Hessians from both cost functions and constraints, and
225
+ * applies the appropriate scaling factors.
226
+ *
227
+ * The Hessian of the cost function is multiplied by @c obj_factor, while the
228
+ * Hessians of the constraints are weighted by their corresponding Lagrange
229
+ * multipliers in @c lambda.
230
+ *
222
231
* @param [in] x The current values of the optimization variables.
223
- * @param [in] obj_factor The scaling multiplier for the hessian of the objective function(cost).
224
- * @param [in] lambda Lagrange Multipliers of the constraints.
225
- * @param [out] values The nonzero derivatives ordered by Eigen::RowMajor.
232
+ * @param [in] obj_factor The scaling multiplier for the Hessian of the objective function (cost).
233
+ * @param [in] lambda The Lagrange multipliers for the constraints.
234
+ * @param [out] values The nonzero second-order derivatives, ordered in @c Eigen::RowMajor format .
226
235
*/
227
236
void EvalNonzerosOfHessian (const double * x, double obj_factor, const double * lambda, double * values);
228
237
238
+ /* *
239
+ * @brief Computes the full Hessian by summing the Hessians of costs and constraints.
240
+ *
241
+ * This function returns the total Hessian, which combines the second-order
242
+ * derivatives of both cost functions and constraints with respect to the
243
+ * optimization variables.
244
+ *
245
+ * The primary purpose of this function is to determine the structure of the
246
+ * overall Hessian, including the number and positions of nonzero elements.
247
+ * The resulting matrix is stored in sparse format for efficiency.
248
+ */
229
249
Hessian GetTotalHessian () const ;
250
+
251
+ /* *
252
+ * @brief The sparse-matrix representation of the Hessians of the constraints.
253
+ *
254
+ * This function returns a pair of vectors, where the first vector contains
255
+ * the indices of the corresponding constraints, and the second vector holds
256
+ * the Hessian matrices in sparse format.
257
+ *
258
+ * Each Hessian matrix represents the second-order derivatives of a constraint
259
+ * with respect to the optimization variables. The Hessians are stored sparsely
260
+ * to optimize memory usage, as they are typically very sparse.
261
+ */
230
262
RowIndicesHessiansPair GetHessianOfConstraints () const ;
263
+
264
+
265
+ /* *
266
+ * @brief The sparse-matrix representation of the Hessians of the cost functions.
267
+ *
268
+ * This function returns a pair of vectors, where the first vector contains
269
+ * the indices of the corresponding cost functions, and the second vector holds
270
+ * the Hessian matrices in sparse format.
271
+ *
272
+ * Each Hessian matrix represents the second-order derivatives of a cost function
273
+ * with respect to the optimization variables. The Hessians are stored sparsely
274
+ * to optimize memory usage, as they are typically very sparse.
275
+ */
231
276
RowIndicesHessiansPair GetHessianOfCosts () const ;
232
277
233
278
/* *
0 commit comments