Lapack求解线性方程组

时间:2021-08-22 05:39:17

可参见这两个页面:

1. http://www.culatools.com/dense/lapack/

2. http://www.netlib.org/lapack/lug/node1.html

根据实际需要,找到相应的程序,再去lapack中搜索该程序的源码来调用即可。

以求解超定线性方程组为例,它采用最小二乘法(Least Squares Routines)求解,使 Lapack求解线性方程组最小,相应的程序有:

Table 2.3: Driver routines for linear least squares problems
Operation Single precision Double precision
  real complex real complex
solve LLS using QR or LQ factorization SGELS CGELS DGELS ZGELS
solve LLS using complete orthogonal factorization SGELSY CGELSY DGELSY ZGELSY
solve LLS using SVD SGELSS CGELSS DGELSS ZGELSS
solve LLS using divide-and-conquer SVD SGELSD CGELSD DGELSD ZGELSD