GraphBLAS / graphblas-api-c

Other
7 stars 3 forks source link

Specification bug in Matrix_diag #69

Closed pcostanza closed 2 years ago

pcostanza commented 2 years ago

Hi,

There is a specification bug in 2.0 for Matrix_diag. On page 86, lines 1972 and 1973, there are two cases for k >= 0, and there is no case for k < 0. What was probably meant is that line 1973 should read like this:

L(C) = {(i+k, i, v_i) : (i, v_i) ∈ L(v)} if k < 0.

Somebody probably thought that "i+k" is confusing because i should be decremented by some value. ;)

Maybe another formulation could be this:

L(C) = {(i-|k|, i, v_i) : (i, v_i) ∈ L(v)} if k < 0.

Pascal

pcostanza commented 2 years ago

Sorry, this should actually rather be this:

L(C) = {(i-k, i, v_i) : (i, v_i) ∈ L(v)} if k < 0.

mcmillan03 commented 2 years ago

The second comment is the correct one. Fixing.

mcmillan03 commented 2 years ago

Pushed fix to repo. Scheduled with 2.0.1 release.