使用Eigen修改null表达式的值 [英] Modifying values of nullary-expressions using Eigen

查看:164
本文介绍了使用Eigen修改null表达式的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确实想在Eigen3中编写一个可修改的自定义null表达式。如本征文档所述,似乎nullary表达式不可修改。有没有一种简单的方法来获得可修改的自定义nullary表达式?

I do want to write a custom nullary-expression in Eigen3, which is modifyable. As described in the Eigen documentation it seems like nullary-expression are not modifiable. Is there an easy way to get something like a modifyable custom nullary-expression?

我想用它来编写自定义数据包装器。

I would like to use it to write a custom data wrapper.

推荐答案

Nullary表达式确实是只读的。对于读写表达式,您当前必须编写自己的表达式。为此,您可以从教程开始,并从实现Eigen中的转置表达式。

Nullary-expressions are indeed read-only. For read-write expressions, you currently has to write your own expression. To this end you can start with this tutorial and take inspiration from the implementation of the Transpose expression in Eigen.

这篇关于使用Eigen修改null表达式的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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