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
you can use arthur's sparse.q
to create the same table you have, but marching over the matrix all at the same time should be the fastest by of finding neighbors.
sm:{([]row:where count each i;col:raze i;val:raze x@'i:where each x<>0)}
c:raze "L"=i;l:raze "#"=i;
s:{(count x;count first x)} i
d:{x!s sv flip x}flip s vs til prd s
p:flip key d
m:{{?[c y;y;d flip x+s vs y]}[x]/[d flip x+y]}
n:(1_{x cross x}0 1 -1) m: p
seat:{c*(5>a)&x|0=a:sum 0^x n}
sum seat over l
The text was updated successfully, but these errors were encountered:
you can use arthur's sparse.q
to create the same table you have, but marching over the matrix all at the same time should be the fastest by of finding neighbors.
sm:{([]row:where count each i;col:raze i;val:raze x@'i:where each x<>0)}
c:raze "L"=i;l:raze "#"=i;
s:{(count x;count first x)} i
d:{x!s sv flip x}flip s vs til prd s
p:flip key d
m:{{?[c y;y;d flip x+s vs y]}[x]/[d flip x+y]}
n:(1_{x cross x}0 1 -1) m: p
seat:{c*(5>a)&x|0=a:sum 0^x n}
sum seat over l
The text was updated successfully, but these errors were encountered: