Scala Breeze 中是否有一种机制,我可以在其中添加到 DenseVectors 而无需自己编写代码?

Is there a mechanism in Scala Breeze where I can add to DenseVectors without having to code it myself?

例如,如果我有两个密集向量:

val a = DenseVector(1.0, 2.0) -和- val b = DenseVector(3.0, 4.0)

我想添加它们,是否有类似添加函数的东西,我可以在 breeze 库中将它们传递给两个,通过为我添加它们可以让我的生活更轻松......或者我要去必须自己编写一个加法运算?

提前致谢!!!

+ 运算符适用于 DenseVectors。有关 DenseVectors 支持的许多操作,请参阅 https://github.com/scalanlp/breeze/wiki/Linear-Algebra-Cheat-Sheet