![]() |
Pangolin
Header-only C++20 plane computational geometry library
|
Enumeration of polyominoes as Pangolin polygons. More...
#include "algorithm/sortpoints.hpp"#include <cstdint>#include <algorithm>#include <array>#include <cstddef>#include <map>#include <set>#include <utility>#include <vector>Go to the source code of this file.
Namespaces | |
| namespace | pgl |
Functions | |
| template<class T = int> | |
| std::vector< Polygon< Point< T > > > | pgl::polyominoes (std::size_t size) |
| Enumerates the free polyominoes of a given size as polygons. | |
| template<class T = int> | |
| std::vector< Polygon< Point< T > > > | pgl::polyominoes (std::size_t n1, std::size_t n2) |
| Enumerates the free polyominoes of every size in [n1, n2]. | |
| template<class T = int> | |
| std::vector< Polygon< Point< T > > > | pgl::polyominoesUpTo (std::size_t n) |
Enumerates the free polyominoes of every size from 1 to n. | |
| template<class T = int> | |
| std::vector< PolygonWithHoles< Point< T > > > | pgl::polyominoRegions (std::size_t size) |
| Enumerates the free polyominoes of a given size as regions. | |
| template<class T = int> | |
| std::vector< PolygonWithHoles< Point< T > > > | pgl::polyominoRegions (std::size_t n1, std::size_t n2) |
| Enumerates the free polyominoes of every size in [n1, n2] as regions. | |
| template<class T = int> | |
| std::vector< PolygonWithHoles< Point< T > > > | pgl::polyominoRegionsUpTo (std::size_t n) |
Enumerates the free polyominoes of every size from 1 to n as regions. | |
Enumeration of polyominoes as Pangolin polygons.
A polyomino is a finite, edge-connected set of unit cells of the integer grid. This header enumerates the free polyominoes of a given size (cells counted up to translation, rotation and reflection) and returns each as the Polygon tracing its boundary, or — for polyominoRegions — as the PolygonWithHoles bounded by all of its boundary loops.