scalanlp breeze linear algebra: zip two vectors together

218 Views Asked by At

I'm used to working with lists. If I have two lasts A and B and a function that takes two doubles and returns a double, then I could do the following

A.zip(B).map(x=>myfunction(x._1,x._2))

This is the way my brain is used to thinking about these problems.

Now that I am doing linear algebra with Breeze, A and B are both types DenseVector[Double], which have no zip method. Is there a good alternative of doing what I want to achieve?

0

There are 0 best solutions below