matrix multiplication but min of product instead of sum of product

I want to execute a modified matrix multiplication where instead sum of product we obtain min of product.

classic matmult : (A@B)ij -> sum( Aik * Bkj for k in range(A.shape[1])

my custom matmult : (A@B)ij -> min( Aik * Bkj for k in range(A.shape[1])

My matrices are very large and in the scipy sparse format. This is why I need something smarter than calculate all positions.

THIS IS NOT A DUPLICATE of matrix multiplication but sum of min() instead of sum of product

  • The sparse @ uses a two stage calculation each writtem in cython (i.e. compiled). The comments reference a math paper from the 1990s, which should be well known in the sparse math community. It uses the CSR format.

    – 

  • Looks like SO’s ‘related questions’ has found some thing useful.

    – 

  • 1) Can you give an example brute-force solution so answer writers have something to test against? 2) What is the format of these scipy sparse matricies? CSR? CSC? COO?

    – 

Leave a Comment