特征的奇怪行为:: select() [英] strange behavior of eigen::select()
本文介绍了特征的奇怪行为:: select()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
in eigen,the construct:
in eigen, the construct:
(R.array() < s).select(P,Q);
<作为R)。但是一旦它们的
都是标量,我得到一个编译错误。
works when either one or both of P,Q are vectors (of the same length as R). But as soon as both of them are scalars, I get a compilation error.
我的问题是;是 select
在两个标量的存在
的行为,为特征警告我,
有更有效的结构的方式?
My question is; is the behavior of select
in the presence
of two scalars a way for eigen to warn me that
there are more efficient constructs? If so, what are they?
推荐答案
您可以使用 VectorXd :: Constant(size,值)
。
这篇关于特征的奇怪行为:: select()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文