- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是上一个问题的延续 - 主要围绕 Armadillo C++ 库中对 SpMat(或 sp_mat)的支持。
尝试求逆稀疏矩阵时,出现编译错误
error: no matching function for call to ‘inv(arma::SpMat<double>&)’
我宁愿不为 sp_mat 编写自己的矩阵求逆,除非我真的必须这样做,而且我不能使用 inv(arma::Mat&) 原型(prototype),因为我将要操作的稀疏矩阵会占用数百个如果将其转换为非稀疏矩阵,则需要 GB 的 RAM。
还有,怎么样
error: no matching function for call to ‘join_cols(arma::sp_mat, arma::sp_mat)’
sp_mat 不是支持列连接的类型吗?
如有任何帮助,我们将不胜感激!
编辑:关注稀疏矩阵求逆错误的问题。使用的 Armadillo 版本是 3.910.1
最佳答案
与前面关于 vec
和 mat
的问题相比,至少从 Armadillo header 来看,似乎 sp_mat
和 mat
具有不相关的基本类型,因此您不能将 sp_mat
类型作为参数推送到 inv
和 join_cols
,我想对底层数据结构做。另外,由于您需要的两个功能在这里都没有提到 http://arma.sourceforge.net/docs.html#SpMat我猜支持是不存在的。因为我至少部分理解需要将这样的 bix 矩阵保留为稀疏矩阵,所以使用像 http://math.nist.gov/sparselib++/ 这样的替代方案可能是有意义的和 http://math.nist.gov/mv++/ ?
关于c++ - Armadillo 错误 : no matching function for call to ‘inv(arma::SpMat<double>&)’ ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18786706/
我想知道如何遍历 sp_umat 的所有非零条目(即 SpMat )在 Armadillo 中,并遇到了这个相关问题( link )。该帖子建议使用 const_iterator检索 sp_mat 中
我正在使用 Armadillo C++ 线性代数库,我正在尝试弄清楚如何将 sp_mat 转换为稀疏矩阵对象到标准 mat稠密矩阵。 查看 internal code doc , sp_mat和 ma
是否有一种有效的方法可以只保留 Armadillo 稀疏矩阵的行,这些行总和至少达到矩阵各列的总计数水平?例如,我想保留第 i 行,如果它的值的总和是 >=C,其中 C 是一些选择值(value)。
我正在尝试在 Armadillo 中使用稀疏矩阵,并且注意到 SpMat 的访问时间存在显着差异与使用 Mat 的等效代码相比. 描述: 下面是两种方法,除了Method_One 之外,它们在各个方面
这是上一个问题的延续 - 主要围绕 Armadillo C++ 库中对 SpMat(或 sp_mat)的支持。 尝试求逆稀疏矩阵时,出现编译错误 error: no matching function
我是一名优秀的程序员,十分优秀!