bwmodel
A modeling environment for Minecraft Bedwars
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
bwmodel::HeatMap Class Reference

#include <heatmap.h>

Inheritance diagram for bwmodel::HeatMap:
bwmodel::GridInterface< double, int >

Public Member Functions

void concentrate_at (std::vector< std::pair< int, int > > points)
 
void filter (int kernel_radius)
 
void merge_with (HeatMap &other)
 
- Public Member Functions inherited from bwmodel::GridInterface< double, int >
int width () const
 
int height () const
 

Static Public Member Functions

static std::unique_ptr< HeatMapuniform (int width, int height)
 

Protected Member Functions

const Grid< double > & backing () const override
 
- Protected Member Functions inherited from bwmodel::GridInterface< double, int >
void assert_grid_invariant ()
 

Detailed Description

A two-dimensional probability distribution.

Member Function Documentation

◆ backing()

const Grid< double > & bwmodel::HeatMap::backing ( ) const
overrideprotectedvirtual

Internally retrieves the backing (nested vector) for helper function generation in GridInterface.

Implements bwmodel::GridInterface< double, int >.

◆ concentrate_at()

void bwmodel::HeatMap::concentrate_at ( std::vector< std::pair< int, int > > points)

Concentrates all of the distribution at the given points.

◆ filter()

void bwmodel::HeatMap::filter ( int kernel_radius)

Assigns each point in the heat map to the average of its neighbors within a square of size kernel_radius.

◆ merge_with()

void bwmodel::HeatMap::merge_with ( HeatMap & other)

TODO: document. basically this is when you have one player kill another so you can know they are in the same location but you don't know where so you just adjust both players location heat maps to reflect this. the other player obviously just gets put back at their base but you get the idea.

◆ uniform()

std::unique_ptr< HeatMap > bwmodel::HeatMap::uniform ( int width,
int height )
static

Creates a uniformly-distributed heat map with dimensions width and height.


The documentation for this class was generated from the following files: