Abelian sandpile model/Identity: Difference between revisions
Content deleted Content added
Line 68: | Line 68: | ||
function Sandpile(s::String) |
function Sandpile(s::String) |
||
arr = [parse(UInt8, x.match) for x in eachmatch(r"\d+", s)] |
arr = [parse(UInt8, x.match) for x in eachmatch(r"\d+", s)] |
||
siz = |
siz = isqrt(length(arr)) |
||
return Sandpile(reshape(UInt8.(arr), siz, siz)') |
return Sandpile(reshape(UInt8.(arr), siz, siz)') |
||
end |
end |