20 if (r0_off > 1e-15 || r0_diag > 1e-15) {
21 if (r0_off >= r0_diag || r0_off >= 1e-15) {
25 *v0 = (r0_diag > 1e-15) ? 0.0 : 1.0;
26 *v1 = (r0_diag > 1e-15) ? 1.0 : 0.0;
30 if (r1_off > 1e-15 || r1_diag > 1e-15) {
31 if (r1_diag > 1e-15) {
33 *v1 = -a10 / (a11 - lam);
48 for (
size_t i = 0; i < 2; i++) {
51 real_null_vector(a00, a01, a10, a11, lam, &v0, &v1);
53 if (nrm == 0.0) { v0 = 1.0; v1 = 0.0; nrm = 1.0; }
79 if (lmmc_abs(a01) > lmmc_abs(a10)) {
85 lmmc_real_t nrm = hypot(hypot(vr0, vr1), hypot(vi0, vi1));
99 lmmc_real_t nrm = hypot(hypot(vr0, vr1), hypot(vi0, vi1));
133 real_vectors_2x2(a00, a01, a10, a11, matrix_scale, out_result);
135 complex_vectors_2x2(a00, a01, a10, a11, matrix_scale, out_result);
LMMC binary real type and arithmetic spelling.
double lmmc_real_t
Public and internal LMMC real type.
一般实矩阵完整特征分解结果(特征值 + 特征向量).
void lmmc_eigen_values_2x2(lmmc_real_t a00, lmmc_real_t a01, lmmc_real_t a10, lmmc_real_t a11, lmmc_real_t *real0, lmmc_real_t *imag0, lmmc_real_t *real1, lmmc_real_t *imag1)
void lmmc_eigen_vectors_2x2(const lmmc_mat_t *a, lmmc_real_t scale, lmmc_eigen_gen_full_result_t *result)
特征值 / SVD 模块内部共享的缩放、Householder 与 Givens 辅助接口(仅源文件可见)。
#define MAT_ELEM(mat, i, j)
稠密矩阵直接分解接口(LU、Cholesky、QR)。
Private recoverable allocator for persistent LMMC ownership.