固定尺寸的稠密线性系统(N = 9),对称,正半定的快速解决方案 [英] Fast solution of dense linear system of fixed dimension (N=9), symmetric, positive-semidefinite

查看:149
本文介绍了固定尺寸的稠密线性系统(N = 9),对称,正半定的快速解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这算法,你会推荐为固定尺寸的稠密线性系统(N = 9)(矩阵是对称的,正半定)?

Which algorithm you would recommend for fast solution of dense linear system of fixed dimension (N=9) (matrix is symmetric, positive-semidefinite)?

  • 高斯消元法
  • LU分解
  • Cholesky分解
  • 等?

类型有32位和64位浮点。

Types are 32 and 64 bits floating points.

这样的系统将得到解决数百万次,这样的算法应该是相当快相对于维(N = 9)。

Such systems will be solved millions of times, so algorithm should be rather fast with respect to dimension (n=9).

P.S。对稳健 C ++实现的算法的例子是AP preciated。

P.S. examples of robust C++ implementations for proposed algorithm are appreciated.

1)你说的解决的时候千万是什么意思?一百万不同的右手上,还是一百万不同的矩阵?同样的系数矩阵

1) What do you mean by "solved million of times"? Same coefficient matrix with a million of different right hand terms, or a million of distinct matrices?

独特的矩阵元。

2)正_semi_definite意味着矩阵是奇异的(机器precision)。你认为该怎样处理这种情况?只是产生一个错误,或者尝试返回一些明智的办法?

2) Positive _semi_definite means that matrix can be singular (to machine precision). How would you like to deal with this case? Just raise an error, or try to return some sensible answer?

扬起的错误就可以了。

推荐答案

矩阵是对称的,正半定,在 Cholesky分解是严格优于LU分解。 (比卢,大约两倍快任何矩阵的大小来源:由Trefethen和巴乌数值代数)

The matrix being symmetric, positive-semidefinite, the Cholesky decomposition is strictly superior to the LU decomposition. (roughly twice faster than LU, whatever the size of the matrix. Source : "Numerical Linear Algebra" by Trefethen and Bau)

这也是事实为小型密集矩阵(来源:我在计算数学博士学位)的标准迭代方法比直接方法效率较低,除非系统变大anough(拇指快速规则意味着什么,但总是不错的:在任何现代电脑,任何矩阵小于100 * 100,绝对是一个小矩阵,需要直接的方法,而不是重复的)

It is also de facto the standard for small dense matrices (source : I do a PhD in computational mathematics) Iterative methods are less efficient than direct methods unless the system becomes large anough (quick rule of thumb that means nothing, but that is always nice to have : on any modern computer, any matrix smaller than 100*100 is definitely a small matrix that needs direct methods, rather than iterative ones)

现在,我不建议自己做。有吨的好图书馆外面,已经彻底的测试。但是,如果我向你推荐一个,它会的:

Now, I do not recommend to do it yourself. There are tons of good libraries out there that have been thoroughly tested. But if I have to recommend you one, it would be Eigen :

  • 在无需安装(头只图书馆,所以没有图书馆链接,只有#包括<>)
  • 严谨,高效的(他们有很多的主网页基准测试中,结果是好的)
  • 易于使用和有据可查

顺便说一句,这里的文档 ,你有他们的7的各种利弊直接线性解算器在一个不错的,简洁的表。看来,在你的情况下,活体肝移植(乔里斯基的变化)胜

By the way, here in the documentation, you have the various pros and cons of their 7 direct linear solvers in a nice, concise table. It seems that in your case, LDLT (a variation of Cholesky) wins

这篇关于固定尺寸的稠密线性系统(N = 9),对称,正半定的快速解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆