Skip to main content

AutoPatternValueMap

Type Alias AutoPatternValueMap 

Source
pub type AutoPatternValueMap<Pat, Tile> = HashMap<Pat, ProbabilitySet<Tile>, BuildHasherDefault<FxHasher>>;
Expand description

A hash map from patterns to tiles. It is possible for multiple tiles to share the same pattern, and in that case there is no way for the autotiler to deterministically choose a tile. This map gives each pattern a ProbabilitySet that can be used to randomly select a tile based upon the relative frequency of each tile.

  • Pat: The type of a tile pattern.
  • Tile: The type of a tile.

See AutoTileContext for a way to construct an AutoPatternValueMap.

Aliased Typeยง

pub struct AutoPatternValueMap<Pat, Tile> { /* private fields */ }