Initializes lower diagonal matrix L and performs backward and forward substitutions using this matrix.
More...
#include <ip_matrix_ecL.h>
|
void | chol_dec (double *) |
| Performs Cholesky decomposition of a matrix. More...
|
|
void | form_M (const double, const double, const double *, const double *) |
| Forms M = R*inv(hess_phi)*R'. More...
|
|
void | form_MAT (const double, const double) |
| Forms matrix MAT = M * A'. More...
|
|
void | form_AMATMBiPB (const double, const double, const double *, const double, double *) |
| Forms matrix AMATMBiPB = A * M1 * A' + 0.5 * M2 + 0.5 * B * inv(P) * B. More...
|
|
void | form_L_non_diag (const double *, double *) |
| Forms a 6x6 matrix L(k+1, k), which lies below the diagonal of L. More...
|
|
void | form_L_diag (const double *, const double, double *) |
| Forms a 6x6 matrix L(0, 0) = chol (M + B * inv(2*P) * B). More...
|
|
void | form_L_diag (const double *, double *) |
| Forms a 6x6 matrix L(k+1, k+1), which lies on the main diagonal of L. More...
|
|
Initializes lower diagonal matrix L and performs backward and forward substitutions using this matrix.
Definition at line 42 of file ip_matrix_ecL.h.
◆ matrix_ecL()
IP::matrix_ecL::matrix_ecL |
( |
const int |
N | ) |
|
◆ ~matrix_ecL()
IP::matrix_ecL::~matrix_ecL |
( |
| ) |
|
◆ chol_dec()
void IP::matrix_ecL::chol_dec |
( |
double * |
mx | ) |
|
|
private |
Performs Cholesky decomposition of a matrix.
- Parameters
-
[in,out] | mx | a pointer to a 6x6 matrix, the result is stored in the same place. |
- Attention
- Only the elements below the main diagonal are used in conmputations.
Definition at line 89 of file ip_matrix_ecL.cpp.
◆ form()
Builds matrix L.
- Parameters
-
[in] | ppar | parameters. |
[in] | i2hess | 2*N diagonal elements of inverted hessian. |
Definition at line 326 of file ip_matrix_ecL.cpp.
◆ form_AMATMBiPB()
void IP::matrix_ecL::form_AMATMBiPB |
( |
const double |
A3, |
|
|
const double |
A6, |
|
|
const double * |
B, |
|
|
const double |
i2P, |
|
|
double * |
result |
|
) |
| |
|
private |
Forms matrix AMATMBiPB = A * M1 * A' + 0.5 * M2 + 0.5 * B * inv(P) * B.
- Parameters
-
[in] | A3 | 4th and 7th elements of A (A is represented by two identical 3x3 matrices). |
[in] | A6 | 6th element of A (A is represented by two identical 3x3 matrices). |
[in] | B | a vector of 3 elements. |
[in] | i2P | 0.5 * inv(P) (only one number) |
[in,out] | result | result |
- Attention
- Only the elements below the main diagonal are initialized.
Definition at line 246 of file ip_matrix_ecL.cpp.
◆ form_L_diag() [1/2]
void IP::matrix_ecL::form_L_diag |
( |
const double * |
B, |
|
|
const double |
i2P, |
|
|
double * |
ecLc |
|
) |
| |
|
private |
Forms a 6x6 matrix L(0, 0) = chol (M + B * inv(2*P) * B).
- Parameters
-
[in] | B | a vector of 3 elements. |
[in] | i2P | 0.5 * inv(P) (only one number) |
[out] | ecLc | result |
- Attention
- Only the elements below the main diagonal are initialized.
Definition at line 209 of file ip_matrix_ecL.cpp.
◆ form_L_diag() [2/2]
void IP::matrix_ecL::form_L_diag |
( |
const double * |
p, |
|
|
double * |
ecLc |
|
) |
| |
|
private |
Forms a 6x6 matrix L(k+1, k+1), which lies on the main diagonal of L.
- Parameters
-
[in] | p | a 6x6 matrix lying to the left from ecLc on the same level of L |
[in,out] | ecLc | AMATMBiPB as input / the result is stored here |
- Attention
- Only the elements below the main diagonal are initialized.
Definition at line 275 of file ip_matrix_ecL.cpp.
◆ form_L_non_diag()
void IP::matrix_ecL::form_L_non_diag |
( |
const double * |
ecLp, |
|
|
double * |
ecLc |
|
) |
| |
|
private |
Forms a 6x6 matrix L(k+1, k), which lies below the diagonal of L.
- Parameters
-
[in] | ecLp | previous matrix lying on the diagonal of L |
[in] | ecLc | the result is stored here |
Definition at line 151 of file ip_matrix_ecL.cpp.
◆ form_M()
void IP::matrix_ecL::form_M |
( |
const double |
sinA, |
|
|
const double |
cosA, |
|
|
const double * |
i2Q, |
|
|
const double * |
i2hess |
|
) |
| |
|
private |
Forms M = R*inv(hess_phi)*R'.
- Parameters
-
[in] | sinA | sin of rotation angle. |
[in] | cosA | cos of rotation angle. |
[in] | i2Q | a vector of three repeating diagonal elements of inv(Q) |
[in] | i2hess | a 2*N vector of diagonal elements of hess_phi (indicies of these elements are 1:3:N*SMPC_NUM_STATE_VAR) |
- Attention
- Only elements lying below the main diagonal of 4x4 matrix are initialized (other elements are not unique).
Definition at line 54 of file ip_matrix_ecL.cpp.
◆ form_MAT()
void IP::matrix_ecL::form_MAT |
( |
const double |
A3, |
|
|
const double |
A6 |
|
) |
| |
|
private |
Forms matrix MAT = M * A'.
- Parameters
-
[in] | A3 | 4th and 7th elements of A. |
[in] | A6 | 6th element of A. |
Definition at line 127 of file ip_matrix_ecL.cpp.
◆ solve_backward()
void IP::matrix_ecL::solve_backward |
( |
const int |
N, |
|
|
double * |
x |
|
) |
| |
Solve system ecL' * x = b using backward substitution.
- Parameters
-
[in] | N | number of states in the preview window |
[in,out] | x | vector "b" as input, vector "x" as output. |
Definition at line 435 of file ip_matrix_ecL.cpp.
◆ solve_forward()
void IP::matrix_ecL::solve_forward |
( |
const int |
N, |
|
|
double * |
x |
|
) |
| |
Solve system ecL * x = b using forward substitution.
- Parameters
-
[in] | N | number of states in the preview window |
[in,out] | x | vector "b" as input, vector "x" as output (N * SMPC_NUM_STATE_VAR) |
Definition at line 373 of file ip_matrix_ecL.cpp.
◆ ecL
double* IP::matrix_ecL::ecL |
◆ MAT
The documentation for this class was generated from the following files: