Fork me on GitHub
#uncomplicate
<
2016-09-18
>
blueberry17:09:18

@adebesin What exactly do you consider "multiplying" two vectors? There is the dot product, http://neanderthal.uncomplicate.org/codox/uncomplicate.neanderthal.core.html#var-dot

kazuwal18:09:05

@blueberry The operations in the above code can be interpreted as (map - [1 2] [5 6]) and (map + [1 2] [5 6]) is there an operation that would resemble executing (map * [1 2] [5 6])

kazuwal18:09:01

Currently I use (fmap (fn ^double [^double x ^double y] (* x y)) ... ) to get a RealBlockVector back

blueberry18:09:58

There is no standard operation for that. That's why fmap and fmap! are there. On the other hand, if that is not your final result, but you are using it as a building block for some algorithm, maybe you can use a level 2 or level 3 operation and do not need ellementwise x * y at all.

blueberry18:09:44

BTW, there is a double-fn in uncomplicate.commons.core that can produce a primitive wrapper of : (double-fn )

blueberry18:09:09

formatting: `(double-fn *)

blueberry18:09:37

messed formatting again... but I guess it's parseable 🙂

kazuwal18:09:15

🙂 Cool thanks for your help