jvector icon indicating copy to clipboard operation
jvector copied to clipboard

How about add a mean method like the one of sum(List<VectorFloat>)?

Open fujohnwang opened this issue 1 month ago • 2 comments

I found sum in VectorUtil but no mean :

 public static VectorFloat<?> sum(List<VectorFloat<?>> vectors) 

Sometimes, we may need to calculate the mean of vectors,let's say, when add RaBitQ quantization? 🤪

fujohnwang avatar Nov 08 '25 06:11 fujohnwang

Why not just divide the result by vectors.size()?

marianotepper avatar Nov 12 '25 12:11 marianotepper

I mean it's common operation in vector manipulation, so encapsulating a mean util method will be helpful ;)

fujohnwang avatar Nov 13 '25 09:11 fujohnwang

You can use this method.

marianotepper avatar Nov 17 '25 11:11 marianotepper