| Line 42... |
Line 42... |
#define AX_EQ_B_LU LM_ADD_PREFIX(Ax_eq_b_LU)
|
#define AX_EQ_B_LU LM_ADD_PREFIX(Ax_eq_b_LU)
|
#define AX_EQ_B_CHOL LM_ADD_PREFIX(Ax_eq_b_Chol)
|
#define AX_EQ_B_CHOL LM_ADD_PREFIX(Ax_eq_b_Chol)
|
#define AX_EQ_B_QR LM_ADD_PREFIX(Ax_eq_b_QR)
|
#define AX_EQ_B_QR LM_ADD_PREFIX(Ax_eq_b_QR)
|
#define AX_EQ_B_QRLS LM_ADD_PREFIX(Ax_eq_b_QRLS)
|
#define AX_EQ_B_QRLS LM_ADD_PREFIX(Ax_eq_b_QRLS)
|
#define AX_EQ_B_SVD LM_ADD_PREFIX(Ax_eq_b_SVD)
|
#define AX_EQ_B_SVD LM_ADD_PREFIX(Ax_eq_b_SVD)
|
|
#define AX_EQ_B_BK LM_ADD_PREFIX(Ax_eq_b_BK)
|
#else
|
#else
|
#define AX_EQ_B_LU LM_ADD_PREFIX(Ax_eq_b_LU_noLapack)
|
#define AX_EQ_B_LU LM_ADD_PREFIX(Ax_eq_b_LU_noLapack)
|
#endif /* HAVE_LAPACK */
|
#endif /* HAVE_LAPACK */
|
|
|
/* find the median of 3 numbers */
|
/* find the median of 3 numbers */
|
| Line 549... |
Line 550... |
for(i=0; i<m; ++i)
|
for(i=0; i<m; ++i)
|
jacTjac[i*m+i]+=mu;
|
jacTjac[i*m+i]+=mu;
|
|
|
/* solve augmented equations */
|
/* solve augmented equations */
|
#ifdef HAVE_LAPACK
|
#ifdef HAVE_LAPACK
|
/* 5 alternatives are available: LU, Cholesky, 2 variants of QR decomposition and SVD.
|
/* 6 alternatives are available: LU, Cholesky, 2 variants of QR decomposition, SVD and LDLt.
|
* Cholesky is the fastest but might be inaccurate; QR is slower but more accurate;
|
* Cholesky is the fastest but might be inaccurate; QR is slower but more accurate;
|
* SVD is the slowest but most accurate; LU offers a tradeoff between accuracy and speed
|
* SVD is the slowest but most accurate; LU offers a tradeoff between accuracy and speed
|
*/
|
*/
|
|
|
|
//issolved=AX_EQ_B_BK(jacTjac, jacTe, Dp, m); ++nlss; linsolver=AX_EQ_B_BK;
|
issolved=AX_EQ_B_LU(jacTjac, jacTe, Dp, m); ++nlss; linsolver=AX_EQ_B_LU;
|
issolved=AX_EQ_B_LU(jacTjac, jacTe, Dp, m); ++nlss; linsolver=AX_EQ_B_LU;
|
//issolved=AX_EQ_B_CHOL(jacTjac, jacTe, Dp, m); ++nlss; linsolver=AX_EQ_B_CHOL;
|
//issolved=AX_EQ_B_CHOL(jacTjac, jacTe, Dp, m); ++nlss; linsolver=AX_EQ_B_CHOL;
|
//issolved=AX_EQ_B_QR(jacTjac, jacTe, Dp, m); ++nlss; linsolver=AX_EQ_B_QR;
|
//issolved=AX_EQ_B_QR(jacTjac, jacTe, Dp, m); ++nlss; linsolver=AX_EQ_B_QR;
|
//issolved=AX_EQ_B_QRLS(jacTjac, jacTe, Dp, m, m); ++nlss; linsolver=(int (*)(LM_REAL *A, LM_REAL *B, LM_REAL *x, int m))AX_EQ_B_QRLS;
|
//issolved=AX_EQ_B_QRLS(jacTjac, jacTe, Dp, m, m); ++nlss; linsolver=(int (*)(LM_REAL *A, LM_REAL *B, LM_REAL *x, int m))AX_EQ_B_QRLS;
|
//issolved=AX_EQ_B_SVD(jacTjac, jacTe, Dp, m); ++nlss; linsolver=AX_EQ_B_SVD;
|
//issolved=AX_EQ_B_SVD(jacTjac, jacTe, Dp, m); ++nlss; linsolver=AX_EQ_B_SVD;
|
| Line 941... |
Line 943... |
#undef AX_EQ_B_LU
|
#undef AX_EQ_B_LU
|
#undef AX_EQ_B_CHOL
|
#undef AX_EQ_B_CHOL
|
#undef AX_EQ_B_QR
|
#undef AX_EQ_B_QR
|
#undef AX_EQ_B_QRLS
|
#undef AX_EQ_B_QRLS
|
#undef AX_EQ_B_SVD
|
#undef AX_EQ_B_SVD
|
|
#undef AX_EQ_B_BK
|
|
|
No newline at end of file
|
No newline at end of file
|