You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why do the output vectors and matrices need to be the same size as the inputs?
If one wants e.g. the k smallest elements, it makes sense to me to pass a vector of size k to GxB_Vector_sort. Similarly, the number of columns (by default) or rows (if transposed descriptor is set) can also be used to limit the number of results.
This operation is commonly known as e.g. nsmallest and nlargest. With PAIR/ONEB and ZEROB, one can also get firstn and lastn.
Small aside: what I really want is to randomly sample k elements per row or column, but there is not yet a "random" binary operator or monoid.
Btw, we implemented compactify (very similar to your sort) in python-graphblas years ago that supports first, last, smallest, largest, and random, because we needed it for multiple workloads.
The text was updated successfully, but these errors were encountered:
Why do the output vectors and matrices need to be the same size as the inputs?
If one wants e.g. the k smallest elements, it makes sense to me to pass a vector of size k to
GxB_Vector_sort
. Similarly, the number of columns (by default) or rows (if transposed descriptor is set) can also be used to limit the number of results.This operation is commonly known as e.g. nsmallest and nlargest. With
PAIR/ONEB
andZEROB
, one can also get firstn and lastn.Small aside: what I really want is to randomly sample
k
elements per row or column, but there is not yet a "random" binary operator or monoid.Btw, we implemented
compactify
(very similar to your sort) inpython-graphblas
years ago that supports first, last, smallest, largest, and random, because we needed it for multiple workloads.The text was updated successfully, but these errors were encountered: