tumopp: Tumor growth simulator in C++
|
Base class of coordinate system. More...
#include <coord.hpp>
Public Member Functions | |
template<class URBG > | |
coord_t | random_direction (URBG &engine) |
Choose a random neighbor. | |
virtual std::array< double, MAX_DIM > | continuous (const coord_t &v) const |
Convert coordinates into continuous scale. | |
virtual int | graph_distance (const coord_t &v) const =0 |
Graph distance. | |
virtual double | euclidean_distance (const coord_t &v) const |
Euclidean distance. | |
virtual std::vector< coord_t > | core () const |
square or cube | |
std::vector< coord_t > | sphere (size_t n) const |
sphere coordinates with inside-out direction | |
virtual | ~Coord ()=default |
Destructor. | |
const std::vector< coord_t > & | directions () const noexcept |
getter of directions_ | |
unsigned | dimensions () const noexcept |
getter of dimensions_ | |
Protected Member Functions | |
Coord ()=delete | |
Default constructor is deleted. | |
Coord (unsigned d) | |
Constructor: initialize and check dimensions_. | |
Base class of coordinate system.
|
virtual |
Convert coordinates into continuous scale.
Reimplemented in tumopp::Hexagonal.
|
virtual |
square or cube
Reimplemented in tumopp::Hexagonal.
|
virtual |
Euclidean distance.
Reimplemented in tumopp::Hexagonal.
|
pure virtual |
Graph distance.
Implemented in tumopp::Hexagonal, tumopp::Moore, and tumopp::Neumann.