C ++中的薄QR分解 [英] Thin QR decomposition in c++

查看:179
本文介绍了C ++中的薄QR分解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在易于使用的c ++库,用于矩形矩阵的薄 QR分解?

Eigen似乎仅支持完整的Q矩阵。我可以取一个完整的Q并丢弃一些列,但是不计算它们开头会更有效吗?

Is there an easy to use c++ library for "thin" QR decomposition of a rectangular matrix?
Eigen seems to only support full Q matrices. I can take a full Q and discard some columns, but would it be more efficient to not compute them to begin with?

推荐答案

Newmat 完全满足您的要求。

要将A分解为QR,您可以执行以下操作:

To decompose A into QR, you can do:

Matrix Q = A;
UpperTriangularMatrix R;
QRZ(Q, R)

如果A为3x5矩阵,则R为3x3 Q也将是3x5。

If A is a 3x5 matrix, R will be 3x3 and Q will be 3x5 as well.

这篇关于C ++中的薄QR分解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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