tumopp: Tumor growth simulator in C++
tumopp::Coord Class Referenceabstract

Base class of coordinate system. More...

#include <coord.hpp>

Inheritance diagram for tumopp::Coord:
tumopp::Hexagonal tumopp::Moore tumopp::Neumann

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_.
 

Protected Attributes

const unsigned dimensions_
 {1, 2, 3}
 
std::vector< coord_t > directions_
 initialized in derived class constructor
 
std::uniform_int_distribution< unsigned > dist_direction_
 initialized in derived class constructor
 

Detailed Description

Base class of coordinate system.

Member Function Documentation

◆ continuous()

std::array< double, MAX_DIM > tumopp::Coord::continuous ( const coord_t & v) const
virtual

Convert coordinates into continuous scale.

Reimplemented in tumopp::Hexagonal.

◆ core()

std::vector< coord_t > tumopp::Coord::core ( ) const
virtual

square or cube

Reimplemented in tumopp::Hexagonal.

◆ euclidean_distance()

double tumopp::Coord::euclidean_distance ( const coord_t & v) const
virtual

Euclidean distance.

Reimplemented in tumopp::Hexagonal.

◆ graph_distance()

virtual int tumopp::Coord::graph_distance ( const coord_t & v) const
pure virtual

Graph distance.

Implemented in tumopp::Hexagonal, tumopp::Moore, and tumopp::Neumann.


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