Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f5e7b03
Reduce any set of cells: the cell reduction generalized, with counting
ulfarsson Oct 22, 2026
fdb4852
Test that a cell with no obstruction of its own is not reduced
ulfarsson Oct 22, 2026
39ca3ce
The reduction: rows and columns already in order, cells the rest does…
ulfarsson Oct 22, 2026
70459d6
The reduction without the old mode: every reduction keeps only what t…
ulfarsson Oct 22, 2026
59690f7
The reduction factory's cut region: the cells on one side of a line
ulfarsson Oct 22, 2026
bc268cb
The reduction refuses a set that a tracked pattern of two or more poi…
ulfarsson Oct 23, 2026
1b7f3c5
Tests for the reduction's grouping, monotone obstructions and left-ou…
ulfarsson Oct 23, 2026
00af290
Split the reduction: the condition, plan, children and maps' words to…
ulfarsson Oct 23, 2026
7dafe8f
The reduction's readability and reuse, from the review's suggestions
ulfarsson Oct 23, 2026
fd37016
The CHANGELOG says what changed in the cell reduction's public API
ulfarsson Oct 23, 2026
a4cf74a
Tests for a cell only a requirement list sees, and for two cells of a…
ulfarsson Oct 23, 2026
f17929c
is_reducible reads its cells once, as 7dafe8f's message said it did
ulfarsson Oct 23, 2026
2082857
The reduction's docstrings, reuse and names, from the review's round …
ulfarsson Oct 23, 2026
c96840c
Tests for a cell the rest sees only through a two-point gridded permu…
ulfarsson Oct 23, 2026
3a455a0
is_reducible reads the gridded permutations the rest sees one at a ti…
ulfarsson Oct 23, 2026
11c0b5d
The review's round 3 suggestions: equiv's tests, the regions' sets, d…
ulfarsson Oct 23, 2026
aa11c8b
Tests of what is_reducible, is_rigid and the strategies' encodings re…
ulfarsson Oct 23, 2026
bb99646
test_specification searches level by level, on a class whose every sp…
ulfarsson Oct 23, 2026
d2939c0
Tests of the factory's skips, the seen-alike test's requirement branc…
ulfarsson Oct 23, 2026
83bd9ad
Tests of the maps along a column, the grouping, a column's order, and…
ulfarsson Oct 23, 2026
90b040d
Tests of a column's rigidity away from row 0, extra_parameters withou…
ulfarsson Oct 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,40 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.


## [Unreleased]
### Added
- `ReductionFactory` and `ReductionStrategy`, the reduction of a set of cells: the
cells are made increasing or decreasing, and their own tiling is counted beside
the reduced tiling, which keeps only what the rest of the tiling sees of them
(a Hadamard product, with object maps and random sampling). The factory's
`region` is `"cell"`, `"row"`, `"column"`, `"line"`, `"cut"` (the cells on one
side of a line between two columns or two rows) or `"any"`, the last two with
`max_cells`. The condition, the plan and the children are in
`tilings.algorithms.reduction`.

### Changed
- `CellReductionFactory` and `CellReductionStrategy` are the reduction of single
cells: they count, generate and sample objects, and the kitchen sink pack uses
`ReductionFactory(tracked)`. A cell with no obstruction of its own, in a
component assumption, or in a tracked gridded permutation of two or more
points, is no longer reduced.
- `CellReductionStrategy.formal_step` names the direction, as in "reducing cell
(0, 0) to increasing", where it was "reducing cell (0, 0)".
- The cell reduction's reduced tiling is built with `Tiling`'s defaults
(simplified, empty rows and columns removed), where it was built with
`simplify=False`, `derive_empty=False` and `remove_empty_rows_and_cols=False`,
so a specification saved with the old `CellReductionStrategy` may not rebuild
its children identically. None could have been counted: the old constructor
raised `NotImplementedError`.
- `CellReductionConstructor` is `ReductionConstructor`, which takes the parent,
the children, the plan and the map of the parent's parameters to the reduced
tiling's. The old `CellReductionConstructor(parameter)` counted nothing: each
of its methods raised `NotImplementedError`.

### Removed
- `CellReductionFactory.reducible_cells`,
`CellReductionFactory.can_reduce_cell_with_requirements_and_assumptions` and
`CellReductionFactory.gp_in_row_and_col`. The condition is
`tilings.algorithms.reduction.is_reducible`.

## [4.1.0] - 2026-01-15
### Changed
Expand Down
13 changes: 13 additions & 0 deletions tests/strategies/test_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
PatternPlacementFactory,
PointingStrategy,
RearrangeAssumptionFactory,
ReductionFactory,
RelaxAssumptionFactory,
RequirementCorroborationFactory,
RequirementExtensionFactory,
Expand Down Expand Up @@ -79,6 +80,7 @@
RequirementPointingStrategy,
)
from tilings.strategies.rearrange_assumption import RearrangeAssumptionStrategy
from tilings.strategies.reduction import ReductionStrategy
from tilings.strategies.requirement_insertion import RequirementInsertionStrategy
from tilings.strategies.requirement_placement import RequirementPlacementStrategy
from tilings.strategies.sliding import SlidingStrategy
Expand Down Expand Up @@ -471,6 +473,17 @@ def indices_and_row(strategy):
CellReductionStrategy((3, 3), False, True),
CellReductionStrategy((4, 1), False, False),
]
+ [
ReductionFactory(tracked, region, max_cells)
for tracked in (True, False)
for region in ("cell", "row", "column", "line", "any")
for max_cells in (None, 3)
]
+ [
ReductionStrategy(((0, 0), (1, 0)), True, True),
ReductionStrategy(((2, 1),), False, False),
ReductionStrategy(((0, 1), (2, 0), (3, 3)), False, True),
]
+ [
DeflationStrategy((0, 0), True, True),
DeflationStrategy((2, 1), True, False),
Expand Down
Loading
Loading