Free polyominoes enumeration: Difference between revisions

m
(julia example)
Line 1,386:
 
canonical(poly) = polysort!(map(translate_to_origin, rotations_and_reflections(poly)))
 
in_asstring(elem, vec) = begin s = string(elem); any(x -> x == s, map(string, vec)) end
 
contiguous(p) = [Point(p.x - 1, p.y), Point(p.x + 1, p.y),
Line 1,472 ⟶ 1,470:
#####
</pre>
 
 
 
=={{header|Kotlin}}==
4,105

edits