|
Porytiles
|
#include "porytiles/domain/packing/services/backtracking_strategy.hpp"#include <algorithm>#include <array>#include <cstddef>#include <deque>#include <format>#include <limits>#include <map>#include <string>#include <unordered_set>#include <vector>#include "porytiles/domain/models/color_set.hpp"#include "porytiles/domain/packing/algorithms/packing_initializer.hpp"#include "porytiles/domain/packing/models/packable_tile.hpp"#include "porytiles/domain/packing/models/packed_palette.hpp"#include "porytiles/domain/packing/models/palette_pool.hpp"#include "porytiles/domain/packing/models/shape_group_metadata.hpp"#include "porytiles/domain/packing/services/packing_strategy.hpp"#include "porytiles/utilities/result/chainable_result.hpp"#include "porytiles/utilities/result/error.hpp"Go to the source code of this file.
Namespaces | |
| namespace | porytiles |
| SearchAlgorithm algorithm |
Definition at line 31 of file backtracking_strategy.cpp.
| std::size_t best_branches |
Definition at line 33 of file backtracking_strategy.cpp.
| std::vector<std::size_t> hardware_indices |
Definition at line 41 of file backtracking_strategy.cpp.
| std::vector<ColorSet> initial_palette_colors |
Definition at line 39 of file backtracking_strategy.cpp.
| std::size_t next_tile_index {} |
Definition at line 65 of file backtracking_strategy.cpp.
| std::size_t node_cutoff |
Definition at line 32 of file backtracking_strategy.cpp.
| std::vector<std::size_t> palette_capacities |
Definition at line 40 of file backtracking_strategy.cpp.
| std::vector<ColorSet> palette_colors |
Definition at line 64 of file backtracking_strategy.cpp.
| const ShapeGroupMetadata* shape_group_metadata = nullptr |
Optional shape group metadata for sharing-aware candidate sorting.
When non-null, the DFS and BFS algorithms deprioritize candidate palettes that already contain a sibling from the same shape group. Sibling presence is inferred by checking whether any sibling tile's color set is a subset of the candidate palette's current color set.
Definition at line 51 of file backtracking_strategy.cpp.
| std::vector<std::vector<ColorSet> > sibling_color_sets |
Maps each sorted tile index to a list of sibling color sets from the same shape group.
Populated when shape_group_metadata is non-null. For tile at sorted_tiles[i], sibling_color_sets[i] contains the color sets of all OTHER members of its shape group. Empty if the tile is not in a shape group or has no siblings.
Definition at line 60 of file backtracking_strategy.cpp.
| bool smart_prune |
Definition at line 34 of file backtracking_strategy.cpp.
| std::vector<PackableTile> sorted_tiles |
Definition at line 38 of file backtracking_strategy.cpp.