uncomplicate

ohsudo 2016-09-18T17:40:38.000024Z

@blueberry

2016-09-18T17:53:18.000025Z

@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

ohsudo 2016-09-18T18:10:05.000026Z

@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])

ohsudo 2016-09-18T18:12:01.000027Z

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

2016-09-18T18:15:58.000028Z

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.

2016-09-18T18:18:44.000029Z

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

2016-09-18T18:19:09.000030Z

formatting: `(double-fn *)

2016-09-18T18:19:37.000031Z

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

ohsudo 2016-09-18T18:20:15.000032Z

🙂 Cool thanks for your help