LMMC
Lamina Mathematic core
载入中...
搜索中...
未找到
linear_algebra.h
浏览该文件的文档.
1
8#ifndef LMMC_LINEAR_ALGEBRA_H
9#define LMMC_LINEAR_ALGEBRA_H
10
11#include <stddef.h>
12#include "lmmc/dense.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
46lmmc_status_t lmmc_lu_decompose_inplace(lmmc_mat_t* a, size_t* pivots, size_t* out_swap_count);
47
70lmmc_status_t lmmc_lu_solve(const lmmc_mat_t* lu, const size_t* pivots, const lmmc_vec_t* b, lmmc_vec_t* x);
71
89
108
127
152lmmc_status_t lmmc_qr_solve(const lmmc_mat_t* qr, const lmmc_real_t* tau, const lmmc_vec_t* b, lmmc_vec_t* x);
153
154#ifdef __cplusplus
155}
156#endif
157
158#endif
double lmmc_real_t
Public and internal LMMC real type.
行优先存储的稠密矩阵。
一维稠密向量。
lmmc_status_t lmmc_qr_solve(const lmmc_mat_t *qr, const lmmc_real_t *tau, const lmmc_vec_t *b, lmmc_vec_t *x)
利用 QR 分解结果求解线性系统或最小二乘问题。
lmmc_status_t lmmc_qr_decompose_inplace(lmmc_mat_t *a, lmmc_real_t *tau, size_t tau_size)
就地 Householder QR 分解。
lmmc_status_t lmmc_lu_solve(const lmmc_mat_t *lu, const size_t *pivots, const lmmc_vec_t *b, lmmc_vec_t *x)
利用 LU 分解结果求解线性系统 A*x = b。
lmmc_status_t lmmc_cholesky_decompose_inplace(lmmc_mat_t *a)
就地 Cholesky 分解:A = L*L^T,要求 A 对称正定。
lmmc_status_t lmmc_lu_decompose_inplace(lmmc_mat_t *a, size_t *pivots, size_t *out_swap_count)
就地 LU 分解(带部分主元选取):P*A = L*U。
lmmc_status_t lmmc_cholesky_solve(const lmmc_mat_t *l, const lmmc_vec_t *b, lmmc_vec_t *x)
利用 Cholesky 因子求解 A*x = b(A = L*L^T)。
lmmc_status_t
LMMC 库统一返回的状态码.