|
| distance_grid (unsigned int width=1u, unsigned int length=1u, unsigned int levels=1u) |
|
void | configure (const std::vector< int > &indices) noexcept override |
|
virtual std::string | contents_of (std::shared_ptr< cell > const &c) const noexcept override |
|
virtual std::uint32_t | background_color_for (std::shared_ptr< cell > const &c) const noexcept override |
|
void | calculate_distances (int start_index, int end_index) noexcept |
| Calculates distances for a range of indices.
|
|
std::shared_ptr< distances > | get_distances () const noexcept |
|
| grid (unsigned int r=1u, unsigned int c=1u, unsigned int l=1u) |
|
| grid (std::tuple< unsigned int, unsigned int, unsigned int > dimens) |
|
| grid (const grid &other) |
| Copy constructor.
|
|
grid & | operator= (const grid &other) |
| Assignment operator.
|
|
| grid (grid &&other) noexcept |
| Move constructor.
|
|
grid & | operator= (grid &&other) noexcept |
| Move assignment operator.
|
|
| ~grid () override |
| Destructor.
|
|
std::shared_ptr< cell > | get_neighbor (std::shared_ptr< cell > const &c, Direction dir) const noexcept |
| Get neighbor by the cell's respective location.
|
|
std::vector< std::shared_ptr< cell > > | get_neighbors (std::shared_ptr< cell > const &c) const noexcept |
| Get all the neighbors by the cell.
|
|
void | set_neighbor (const std::shared_ptr< cell > &c, Direction dir, std::shared_ptr< cell > const &neighbor) noexcept |
|
std::shared_ptr< cell > | get_north (const std::shared_ptr< cell > &c) const noexcept override |
|
std::shared_ptr< cell > | get_south (const std::shared_ptr< cell > &c) const noexcept override |
|
std::shared_ptr< cell > | get_east (const std::shared_ptr< cell > &c) const noexcept override |
|
std::shared_ptr< cell > | get_west (const std::shared_ptr< cell > &c) const noexcept override |
|
virtual std::tuple< unsigned int, unsigned int, unsigned int > | get_dimensions () const noexcept override |
| Provides dimensions of grid in no assumed ordering.
|
|
virtual void | to_vec (std::vector< std::shared_ptr< cell > > &cells) const noexcept override |
| Convert a 2D grid to a vector of cells (sorted by row then column)
|
|
std::shared_ptr< cell > | search (int index) const noexcept |
|
int | num_cells () const noexcept |
| Get the count of cells in the grid.
|
|
void | clear_cells () noexcept |
| Cleanup cells by cleaning up links within cells.
|
|
A grid that can calculate distances between cells.