CellModules
SpheroidManager::PluginSpheroidManager< cell_t > Class Template Reference

Class for managing spheroid bodies. More...

#include <PluginSpheroidManager.hpp>

Public Member Functions

 PluginSpheroidManager ()=default
 Default constructor. More...
 
 PluginSpheroidManager (double r)
 Constructor with mean radius. More...
 
MecaCell::Vec getCentroid () const
 Gets the centroid. More...
 
double getSpheroidRadius () const
 Gets the spheroid radius. More...
 
void setMeanRadius (double r)
 Sets the mean radius. More...
 
void updateSpheroid (std::vector< cell_t * > cells)
 Computes everything for the spheroid. More...
 
template<typename world_t >
void initSpheroid (world_t *w)
 Init function to be called on scenario init. More...
 
template<typename world_t >
void preBehaviorUpdate (world_t *w)
 Pre-behavior update hook for MecaCell. More...
 

Private Types

typedef std::vector< double > Data
 

Private Member Functions

void updateDistanceFromCentroid (std::vector< cell_t * > cells)
 Updates the distance from centroid for each cell. More...
 
double getOptimalRadius (const Data &data, double max)
 Computes the optimal radius. More...
 
MecaCell::Vec computeCentroid (std::vector< cell_t * > cells)
 Computes the centroid position. More...
 

Static Private Member Functions

static double Kernel (const double x)
 Gaussian probability density function. More...
 

Private Attributes

MecaCell::Vec centroid
 
double optimRad = 0.0
 
double meanRadius
 

Detailed Description

template<typename cell_t>
class SpheroidManager::PluginSpheroidManager< cell_t >

Class for managing spheroid bodies.

Template Parameters
cell_tType of the cell.

Definition at line 55 of file PluginSpheroidManager.hpp.

Member Typedef Documentation

◆ Data

template<typename cell_t >
typedef std::vector<double> SpheroidManager::PluginSpheroidManager< cell_t >::Data
private

Definition at line 56 of file PluginSpheroidManager.hpp.

Constructor & Destructor Documentation

◆ PluginSpheroidManager() [1/2]

template<typename cell_t >
SpheroidManager::PluginSpheroidManager< cell_t >::PluginSpheroidManager ( )
inlinedefault

Default constructor.

◆ PluginSpheroidManager() [2/2]

template<typename cell_t >
SpheroidManager::PluginSpheroidManager< cell_t >::PluginSpheroidManager ( double  r)
inline

Constructor with mean radius.

Parameters
rMean radius in µm.

Definition at line 176 of file PluginSpheroidManager.hpp.

Member Function Documentation

◆ computeCentroid()

template<typename cell_t >
MecaCell::Vec SpheroidManager::PluginSpheroidManager< cell_t >::computeCentroid ( std::vector< cell_t * >  cells)
inlineprivate

Computes the centroid position.

Parameters
cellsVector of cell pointers.
Returns
Centroid position.

Definition at line 158 of file PluginSpheroidManager.hpp.

◆ getCentroid()

template<typename cell_t >
MecaCell::Vec SpheroidManager::PluginSpheroidManager< cell_t >::getCentroid ( ) const
inline

Gets the centroid.

Returns
Centroid position.

Definition at line 182 of file PluginSpheroidManager.hpp.

◆ getOptimalRadius()

template<typename cell_t >
double SpheroidManager::PluginSpheroidManager< cell_t >::getOptimalRadius ( const Data data,
double  max 
)
inlineprivate

Computes the optimal radius.

Parameters
dataVector of distances from centroids of each cell.
maxMaximal distance from centroid.
Returns
Optimal radius.

Definition at line 132 of file PluginSpheroidManager.hpp.

◆ getSpheroidRadius()

template<typename cell_t >
double SpheroidManager::PluginSpheroidManager< cell_t >::getSpheroidRadius ( ) const
inline

Gets the spheroid radius.

Returns
Spheroid radius.

Definition at line 188 of file PluginSpheroidManager.hpp.

◆ initSpheroid()

template<typename cell_t >
template<typename world_t >
void SpheroidManager::PluginSpheroidManager< cell_t >::initSpheroid ( world_t *  w)
inline

Init function to be called on scenario init.

Computes the spheroid information on the cells to be added.

Template Parameters
world_tType of the world.
Parameters
wPointer to the world.

Definition at line 220 of file PluginSpheroidManager.hpp.

◆ Kernel()

template<typename cell_t >
static double SpheroidManager::PluginSpheroidManager< cell_t >::Kernel ( const double  x)
inlinestaticprivate

Gaussian probability density function.

µ = 0 and sigma = 1

Parameters
xInput value.
Returns
Probability density at x.

Definition at line 71 of file PluginSpheroidManager.hpp.

◆ preBehaviorUpdate()

template<typename cell_t >
template<typename world_t >
void SpheroidManager::PluginSpheroidManager< cell_t >::preBehaviorUpdate ( world_t *  w)
inline

Pre-behavior update hook for MecaCell.

Computes the spheroid information.

Template Parameters
world_tType of the world.
Parameters
wPointer to the world.

Definition at line 233 of file PluginSpheroidManager.hpp.

◆ setMeanRadius()

template<typename cell_t >
void SpheroidManager::PluginSpheroidManager< cell_t >::setMeanRadius ( double  r)
inline

Sets the mean radius.

Parameters
rMean radius.

Definition at line 194 of file PluginSpheroidManager.hpp.

◆ updateDistanceFromCentroid()

template<typename cell_t >
void SpheroidManager::PluginSpheroidManager< cell_t >::updateDistanceFromCentroid ( std::vector< cell_t * >  cells)
inlineprivate

Updates the distance from centroid for each cell.

Parameters
cellsVector of cell pointers.

Definition at line 78 of file PluginSpheroidManager.hpp.

◆ updateSpheroid()

template<typename cell_t >
void SpheroidManager::PluginSpheroidManager< cell_t >::updateSpheroid ( std::vector< cell_t * >  cells)
inline

Computes everything for the spheroid.

Updates centroid position and spheroid radius.

Parameters
cellsVector of cell pointers.

Definition at line 204 of file PluginSpheroidManager.hpp.

Member Data Documentation

◆ centroid

template<typename cell_t >
MecaCell::Vec SpheroidManager::PluginSpheroidManager< cell_t >::centroid
private

Center of gravity

Definition at line 59 of file PluginSpheroidManager.hpp.

◆ meanRadius

template<typename cell_t >
double SpheroidManager::PluginSpheroidManager< cell_t >::meanRadius
private

Mean radius of the cells in µm

Definition at line 61 of file PluginSpheroidManager.hpp.

◆ optimRad

template<typename cell_t >
double SpheroidManager::PluginSpheroidManager< cell_t >::optimRad = 0.0
private

Radius of the spheroid

Definition at line 60 of file PluginSpheroidManager.hpp.


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