特征向量(频谱)分解 [英] Eigenvector (Spectral) Decomposition

查看:186
本文介绍了特征向量(频谱)分解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到一个C代码程序,该程序将允许我计算方矩阵的特征值(频谱)分解。我专门尝试查找在第一列中具有最高特征值(及其相关特征值)的代码。

I am trying to find a program in C code that will allow me to compute a eigenvalue (spectral) decomposition for a square matrix. I am specifically trying to find code where the highest eigenvalue (and therefore its associated eigenvalue) are located int the first column.

我需要输出的原因在于顺序是因为我正在尝试计算特征向量中心性,因此我只需要真正计算与最高特征值相关的特征向量即可。

The reason I need the output to be in this order is because I am trying to compute eigenvector centrality and therefore I only really need to calculate the eigenvector associated with the highest eigenvalue. Thanks in advance!

推荐答案

在任何情况下,我都建议使用专用的线性代数包,例如 Lapack (Fortran,但可以从C调用)或 CLapack 。两者都是免费的,并且提供了几乎所有特征值问题的例程。如果矩阵很大,则最好利用其稀疏性,例如通过使用 Arpack 。所有这些库都倾向于根据特征值对特征向量进行排序(实数或纯虚数特征值)。

In any case I would recommend to use a dedicated linear algebra package like Lapack (Fortran but can be called from C) or CLapack. Both are free and offer routines for almost any eigenvalue problem. If the matrix is large it might be preferable to exploit its sparseness e.g. by using Arpack. All of these libraries tend to sort the eigenvectors according to the eigenvalues if they can (real or purely imaginary eigenvalues).

这篇关于特征向量(频谱)分解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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