How to do dotproduct on tigergraph

Hi There,

Can I check with you, is there a function on Tigergraph which calculates the dotproduct of two vectors. I can do this in python, but I do not see how I can so this on Tigergraph.

Many thanks.

Kind regards,
Aiden

one way is using expression function with arrayAccum.

The expression function is dotProduct_ArrayAccum_ArrayAccum() in

search dotProduct_ArrayAccum_ArrayAccum in this GSQL query.

I also wanted to implement matrix products in GSQL, but seemed to be able to do so only by modifying UDF
But I don’t know anything about C++
It’s so sad