-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhessian_wL.h
34 lines (26 loc) · 1.14 KB
/
hessian_wL.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*Created by Nikilesh Ramesh on 28/11/2024 at 14:57
Motivation: To calculate the hessian of cost*/
#ifndef __HESSIAN_WL__
#define __HESSIAN_WL__
#include "typeDefinitions.h"
#include "UserDefinedFunctions.h"
#include "commonFuncs.h"
// HESSISAN IS size of NZxNZ where NZ = nt + np + M*n + N*m
SparseMatrix hessian_wL(StateVectors X, InputVectors U, TimeVector T, Time t0, Time tf, Perturbation e);
// use for double derivatie with respect to same variable
const Gradient hessWL_CD_xx(
const StateVectors X, const InputVectors U,
const StateVectors pp_X, const InputVectors pp_U,
const StateVectors np_X, const InputVectors np_U,
const Time t0, const Time tf, const TimeVector T,
const Time delta_T, const Time pp_delta_T, const Time np_delta_T,
const TimeVector pp_T, const TimeVector np_T, Perturbation e
);
// use for partial derivatie with respect to different variables
const Gradient hessWL_CD_xy(
const StateVectors pp_X, const InputVectors pp_U,
const StateVectors np_X, const InputVectors np_U,
const Time pp_delta_T, const Time np_delta_T,
const TimeVector pp_T, const TimeVector np_T, Perturbation e
);
#endif