/** * @file csocp_ldl.h * @brief 实现稀疏Cholesky分解模块 * This file implements Sparse cholesky factorization module * @version 0.1 * @date 2021-09-17 * * @copyright Copyright (c) 2021 * */ #include "csocp_config.h" /** 符号分解 Symbolic factorization */ void c_ldl_symbolic(c_int ndim, /**< KKT矩阵的维度 Dimension of KKT matrix */ c_int *Ajc, /**< 输入:KKT矩阵的begin指针 Input begin pointer of KKT matrix */ c_int *Air, /**< 输入:KKT矩阵的index指针 Input index pointer of KKT matrix */ c_int *Ljc, /**< 输出:KKT矩阵的begin指针 Output begin pointer of matrix */ c_int *etree, /**< 临时消去树 Temporary elimination tree */ c_int *lnz, /**< 临时非零元计数 Temporary non-zeros count */ c_int *flag /**< Temporary visit flag */ ); /** 数值分解 Numerical factorization */ void c_ldl_numeric(c_int ndim, /**< KKT矩阵的维度 Dimension of KKT matrix */ c_int *Ajc, /**< 输入:KKT矩阵的begin指针 Input begin pointer of KKT matrix */ c_int *Air, /**< 输入:KKT矩阵的index指针 Input index pointer of KKT matrix */ c_real *Apr, /**< 输入:KKT矩阵的element指针 Input element pointer of KKT matrix */ c_int *Ljc, /**< 输入:L矩阵的begin指针 Input begin pointer of L matrix */ c_int *etree, /**< 输入:消去树 Input elimination tree */ c_int *sign, /**< 输入:符号向量 Input sign vector */ c_real eps, /**< 输入:正则化阈值 Input regularization threshold */ c_real delta, /**< 输入:正则化参数 Input regularization parameter */ c_int *lnz, /**< 输出:L矩阵非零元素数量 Output non-zeros count of L matrix */ c_int *Lir, /**< 输出:L矩阵的index指针 Output index pointer of L matrix */ c_real *Lpr, /**< 输出:L矩阵的element指针 Output element pointer of L matrix */ c_real *D, /**< 输出:对角矩阵D Output diagonal D matrix */ c_real *col, /**< 临时列向量 Temporary column vector */ c_int *pattern, /**< Temporary non-zeros pattern */ c_int *flag /**< Temporary flag for visit status */ ); /** 求解下三角线性方程组L*x=b Solve L*x = b */ void c_ldl_lsolve(c_int ndim, /**< L矩阵维度 Dimension of L matrix */ c_real *b, /**< 输入:右端项 Input RHS value */ c_int *Ljc, /**< 输入:L矩阵的begin指针 Input begin pointer of L matrix */ c_int *Lir, /**< 输入:L矩阵的index指针 Input index pointer of L matrix */ c_real *Lpr, /**< 输入:L矩阵的element指针 Input element pointer of L matrix */ c_real *x /**< 输出:求解结果x Output solution value */ ); /** 求解对角线性方程组D*x=b Solve D*x = b */ void c_ldl_dsolve(c_int ndim, /**< 对角矩阵维度 Dimension of diagonal matrix */ c_real *x, /**< 输入输出:求解结果x Input + Output value */ c_real *D /**< 输入:对角矩阵D Input diagonal matrix */ ); /** 求解上三角线性方程组L'*x=b Solve L'*x = b */ void c_ldl_ltsolve(c_int ndim, /**< L矩阵维度Dimension of L matrix */ c_real *x, /**< 输入输出:求解结果x Input + Output value */ c_int *Ljc, /**< 输入:L矩阵的begin指针 Input begin pointer of L matrix */ c_int *Lir, /**< 输入:L矩阵的index指针 Input index pointer of L matrix */ c_real *Lpr /**< 输入:L矩阵的element指针 Input element pointer of L matrix */ );