从 uBlas 压缩矩阵中删除一行?
我想知道从 uBlas 的压缩矩阵中删除一行的最佳方法是什么?我想知道是否有某种方法可以获取向量内的压缩列数据?我正在查看此页面 http://netlib.org/linalg/html_templates/node92.html 并且找不到如何访问这些元素。
我的矩阵声明如下:
ublas::compressed_matrix
<
double,
ublas::column_major,
0,
ublas::unbounded_array<int>,
ublas::unbounded_array<double> >
我的最终目标是使用此方法删除所有零行。
编辑: 我怀疑解决方案将涉及内部更改 ublas::compressed_matrix 结构。我认为可以安全地假设非零条目的数量约为 1k。我希望调用该方法来删除一行,也许 20 次。
I was wondering what was the best way to remove a row from uBlas's compressed matrix? I was wondering if there was some way to get a hold of the compressed column data inside the vector? I am looking at this page http://netlib.org/linalg/html_templates/node92.html and can't find how to access those elements.
My matrix is declared as follows:
ublas::compressed_matrix
<
double,
ublas::column_major,
0,
ublas::unbounded_array<int>,
ublas::unbounded_array<double> >
My eventual goal is to use this method to remove all zero rows.
EDIT:
I suspect the solution will involve changing the ublas::compressed_matrix structure internally. I think its safe to assume that the number of non-zero entries will be on the order of 1k. I hope to call the method to remove a row, maybe, 20 times.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论