Porytiles
Loading...
Searching...
No Matches
packing_metrics.cpp File Reference
Include dependency graph for packing_metrics.cpp:

Go to the source code of this file.

Namespaces

namespace  porytiles
 

Functions

std::map< std::size_t, std::size_t > porytiles::build_global_multiplicity_map (const std::vector< PackableTile > &tiles, const std::vector< PackableTile > &hints)
 Builds a GLOBAL multiplicity map from all input tiles.
 
double porytiles::compute_average_multiplicity (const std::vector< PackableTile > &tiles, const std::vector< PackableTile > &hints)
 Computes the average multiplicity of the input tiles (problem difficulty metric).
 
std::map< std::size_t, std::size_t > porytiles::build_palette_local_multiplicity (const PackedPalette &palette, const std::map< PackableTile::Id, ColorSet > &tile_colors_map)
 Builds a PALETTE-LOCAL multiplicity map for a specific palette.
 
double porytiles::compute_weighted_cost_in_palette (const ColorSet &tile_colors, const PackedPalette &palette, const std::map< PackableTile::Id, ColorSet > &tile_colors_map)
 Computes the weighted cost of placing a tile in a specific palette.
 
double porytiles::compute_palette_local_efficiency (const ColorSet &tile_colors, const std::map< std::size_t, std::size_t > &local_mult)
 Computes the palette-local efficiency of a tile within its palette.
 
double porytiles::compute_weighted_cost_in_palette_fast (const ColorSet &tile_colors, const PackedPalette &palette)
 Computes the weighted cost of placing a tile in a palette using cached counts.
 
double porytiles::compute_palette_local_efficiency_fast (const ColorSet &tile_colors, const PackedPalette &palette)
 Computes the palette-local efficiency of a tile using cached counts.